4 * Simple test program to test the wiringPi functions
14 // Simple sequencer data
15 // Triplets of LED, On/Off and delay
30 0, 0, 1, // Extra delay
45 0, 0, 1, // Extra delay
47 9, 9, 9, // End marker
58 printf ("Raspberry Pi wiringPi test program\n") ;
60 if (wiringPiSetup () == -1)
63 for (pin = 0 ; pin < 8 ; ++pin)
64 pinMode (pin, OUTPUT) ;
66 pinMode (8, INPUT) ; // Pin 8 SDA0 - Has on-board 2k2 pull-up resistor
72 l = data [dataPtr++] ; // LED
73 s = data [dataPtr++] ; // State
74 d = data [dataPtr++] ; // Duration (10ths)
76 if ((l + s + d) == 27)
84 if (digitalRead (8) == 0) // Pressed as our switch shorts to ground
85 delay (d * 10) ; // Faster!