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 num, bool on )
18
if( num < 0 || num > 9 ) return;
23
// pin 4 needs to be inverted (it's driving a PNP)
24
if( num == 4 ) on = !on;
26
digitalWrite( num, on? HIGH : LOW );
31
bool on = true;//digitalRead( 3 )? true : false;
32
for( int a = 0; a < 9; a++ )