I have a project where I need to control a series of high power LEDs using 2 switches. For the purpose of a prototype I have a single LED connected to pin 13 via a 1kohm resistor to simulate the high power LEDs.
Momentary switches are connected to pins 2 & 3.
I need to create code to do the following:
When SW1 is pressed (SW2 not pressed), code runs LED flash pattern on loop until SW2 is pressed.
When SW2 is pressed (SW1 not pressed), code switches LED off.
I need it so the switches do not need to be held down, just a single press.
I have managed to create flash patterns and control these using switches individually but cannot get the above to work.
Any help would be hugely appreciated!