Can you help me with my Arduino that controls the output of 3 LEDs which uses 2 buttons as an input. The output will be based on the following conditions:
All LEDs are high when both buttons are closed(pressed).
All LEDs are low when both buttons are open(unpressed).
The LEDs will be high one at time from left to right when only the first button is closed(pressed).
The LEDs will be high one at time from right to left when only the second button is closed(pressed).
Unless your LEDs are taking street drugs, that doesn't make much sense. Outputting a HIGH value to the LED pin can turn it on or off, depending on how you connected it.
Hello
Do you have any experience in programing and in the design of finite state machines?
If not, than start with to study the Input-Processing-Output model and take piece of paper and a pencil and design the desired program structure before coding.
You'll need to clarify what both buttons pressed means. From your arduino viewpoint, they will likely be depressed not at the same time but one after the other (possibly a few ms in between the two presses ➜ so you probably need some code to allow for that small lag)