Hi all.
I am quite new to this, and am not sure where I am going wrong.
I'm trying to make one led light up at random from an 8X8 array (I think the code seems quite self explanatory).
Any help with this would be greatly appreciated... (but let me know if I am off on a tangent and I will have to abandon the project... which would be a pity... as I did spend a few hours soldering everything in place.. ![]()
//This program uses 8x8 LED matrix and randomiser for central commander console
//written for the starblaster cockpit
/*
 Star Blaster Cockpit Radar
 see book for wiring diagrams
Random LED flasher by Brett
Circuit = 8x8 LED's (8 rows, 8 colums)
100 ohm resistors on cathodes
cathodes to pins 0,1,2,3,4,5,6,7
anodes to pins 8,9,10,11,12,13,A1,A2
//
*/
int rowranNum;Â Â Â Â //row pin No.
int colranNum;Â Â Â Â //colum pin No.
int pause;Â Â Â Â Â Â Â Â //delay time
void setup() {
 // Setup cathodes (row No.s)
 pinMode(0, INPUT);
 pinMode(1, INPUT);
 pinMode(2, INPUT);
 pinMode(3, INPUT);
 pinMode(4, INPUT);
 pinMode(5, INPUT);
 pinMode(6, INPUT);
 pinMode(7, INPUT);
// Setup anodes (colum No.s)
 pinMode(8, OUTPUT);
 pinMode(9, OUTPUT);
 pinMode(10, OUTPUT);
 pinMode(11, OUTPUT);
 pinMode(12, OUTPUT);
 pinMode(13, OUTPUT);
 pinMode(15, OUTPUT);
 pinMode(16, OUTPUT);
}
void loop() {
 //Generate random number
 rowranNum = random(0, 7);
 colranNum = random(8, 16);
 // Generate random delay time
 pause = random(25, 500);
 //Turn on the LED
 digitalWrite(colranNum, HIGH);
 digitalWrite(rowranNum, LOW);
 delay(pause);
 //Turn off the LED
 digitalWrite(colranNum, LOW);
 digitalWrite(rowranNum, HIGH);
}