3
// set up output pins (4 to 13) for the led array
4
for( int a = 4; a < 14; a++ )
7
// set up mode-switch button on pin 3
9
digitalWrite( 3, HIGH );
12
digitalWrite( 13, HIGH );
16
void ledOn( int pin, bool on )
18
// pin 4 needs to be inverted (it's driving a PNP)
19
if( pin == 4 ) on = !on;
21
digitalWrite( pin, on? HIGH : LOW );
26
bool on = digitalRead( 3 )? true : false;
27
for( int a = 4; a < 12; a++ )