Currently trying to write a piece of code for a project at university, with very little C Compiler experience I am struggling...
Basically- we have 8 LED's, and 8 switches. We want 4 of the 8 LED's to light up at random when the program is run, that then have to be switched off in order using the corresponding switches. They must only be able to be done in order!
E.g If LED's 0,2,4,7 light up, switch 0 must be turned off in order for LED 0 to go off, and LED 2 can only be switched off if LED 0 is already turned off... etc etc.
Once all 4 are turned off in order, we need a small time delay (e.g 3 second) before the LEDs are randomized again and 4 more come on. These will need to be turned off as before... but in REVERSE order (e.g 6,5,3,1).
Any help will be much appreciated!
Edited 6 Years Ago by mmpjb: Bad title!