chloselfesteem:
Hi there,Sorry about the late reply - basically what is supposed to happen is the LEDs will all be off until the button is pressed and then once the button is pressed they will go off in a sequence - similar to a traffic light system if that makes sense
-
detecting debounced button *change of state * sets a latch
-
latch enables a free running (self-resetting) timer
-
when timer is done a counter (the switch argument) is incremented and timer resets
-
switch enables/disables desired LED
-
when counter is done (reaches preset) the counter and latch are reset and system awaits next button press