#include <wiringPi.h>
int main(void)
{
wiringPiSetup() ;
pinMode (0, OUTPUT) ;
for(;;)
{
digitalWrite(0, HIGH) ; delay (500) ;
digitalWrite(0, LOW) ; delay (500) ;
}
}
compile and run it:
gcc -Wall -o blink blink.c -lwiringPi
runing it:
sudo ./blink
BPI have many extend board support WiringPi. so you can free DIY by youself:
more about BPI extend board,please see:
https://bananapi.gitbooks.io/bpi-accessories/content/
BPI-R1 WiringPi
81
Summary of Contents for BPI-R1
Page 5: ...BPI R1 hardware interface BPI R1 hardware interface Front Back BPI R1 hardware interface 5...
Page 6: ...Hardware connect sketch map Front Back BPI R1 hardware interface 6...
Page 7: ...BPI R1 hardware interface 7...
Page 8: ...BPI R1 hardware spec BPI R1 hardware spec 8...
Page 14: ...J13 P01 UART0 RX PB23 J13 P02 UART0 TX PB22 BPI R1 GPIO Pin define 14...
Page 28: ...please note value 0 value 1 press is 1 unpress is 0 BPI R1 IR interface 28...
Page 41: ...BPI R1 RoHS Certification BPI R1 CE FCC RoHS Certification 41...
Page 42: ...BPI R1 CE FCC RoHS Certification 42...
Page 43: ...BPI R1 Software BPI R1 support linux android and openwrt system BPI R1 Software 43...
Page 59: ...Linux kernel 3 4 BSP image 59...