|
You can use https://github.com/zhaolei/WiringOP to control all port
eg. Bash:
# LED Pin - wiringPi pin 0 is BCM_GPIO 17.
PIN=0
gpio mode $PIN out
while true; do
gpio write $PIN 1
sleep 0.5
gpio write $PIN 0
sleep 0.5
done
eg. C:
// LED Pin - wiringPi pin 0 is BCM_GPIO 17.
#define LED 0
int main (void)
{
printf ("Raspberry Pi blink\n") ;
wiringPiSetup () ;
pinMode (LED, OUTPUT) ;
for (;;)
{
digitalWrite (LED, HIGH) ; // On
delay (500) ; // mS
digitalWrite (LED, LOW) ; // Off
delay (500) ;
}
return 0 ;
}
|
|