r/ArduinoProjects • u/[deleted] • Dec 31 '22
Arduino Project
Hi buddies, I am building arduino project that contains two pushbuttons controlling one LED.
When button1 is pressed the LED should turn on, and turn off when that same button1 is released.
When button2 is also pressed, the same LED should turn on, and turn off when button2 is released.
In simple terms, button1 can switch on and off the LED. Button2 can also switch on and off the LED.
Please I'm new to arduino programming, and I need someone to help me with the code. Thank you all.
1
Dec 31 '22
Normally open buttons
1
u/TheBronzeGodd Dec 31 '22
Why can't you run the LED straight through the buttons?
1
Dec 31 '22
Yes I think that's it. Like button1 can turn on and off the led, and button2 can also turn the led on and off
1
Dec 31 '22
Not a three phase motor pushbutton though if I was wrong in the regard.
Small black button that has diagonal contacts if you get what I mean.
I will connect each to arduino digital input pins. So what I need is button1 can turn and off LED and button2 can turn on and off LED respectively
1
Dec 31 '22
Yes I think that's it. Like button1 can turn on and off the led, and button2 can also turn the led on and off
3
u/[deleted] Dec 31 '22
You don't need Arduino for this purpose. This is exactly what push button does.