Sensorian  1.0
C API Reference Guide Library
Blinky.c

Demonstrates the usage of the GPIO API.

/****************************************************************************
* Copyright (C) 2015 Sensorian
* *
* This file is part of Sensorian. *
* *
* Sensorian is free software: you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published *
* by the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* Sensorian is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with Sensorian. *
* If not, see <http://www.gnu.org/licenses/>. *
****************************************************************************/
#include <bcm2835.h>
#include <stdio.h>
#include "Utilities.h"
int main(int argc, char **argv)
{
if (!bcm2835_init()) //Configure I2C pins
{
printf("BCM libray error.\n");
}
printf("Blinking LED demo with the Sensorian Shield.\r\n");
while (1)
{
delay_ms(1000);
delay_ms(1000);
}
bcm2835_close();
return 0;
}