Vafo / ESTC-project

ESTC Main Project
0 stars 0 forks source link

Play sequence only while button is pressed #8

Open Vafo opened 1 year ago

Vafo commented 1 year ago

In current implementation, program always iterates through all LEDs. Change this logic.

Iterate only when a button is pressed. If the button is pressed, released, and pressed again continue from the previous active LED.

Example for the sequence: RRGGGB

Button released => nothing Button pressed for a 3 sec => RRG Button released => nothing Button pressed for a 2 sec => GG Button released => nothing Button pressed for a 5 sec => BRRGG

Vafo commented 1 year ago

Even though it is not really Discrete. i.e. 2 consecutive presses != 2 cycles. 2 Presses can happen in span of 1 second resulting in 1 cycle. Might consider implementing this feature