I'm doing a school project and I need to figure out how to control one led with one switch, and controlling another led with another switch. The thing is that I don't have a breadboard and I don't plan on getting so please help me.
ok, happy to help…
Please post your code so far (in code tags), and your intended circuit diagram to show the connections you’re going to use.
I'm using the regular "Blink" code circuit. I tangled the jumper copper wires together and plugged them in the "5V" and "13" pin holes. That turns on the led. Then I tangle a switch's copper wires with those tangled wires, and it works just fine. However, I'm try to add another led where I can control it with another switch without an Arduino
So, a good place to start would be to add another LED with its resistor on another pin, then tangle up some additions to the existing code - to see if you can make both LEDs work.
After that, tangle up the two push buttons, draw a sketch on paper, depicting the arrangement, and we can work from there.
HINT: I suggest wiring the switches from whatever pins you choose - to 0V, that will make the circuit simpler, and you can use the internal pullup resistors inside the Arduino.
There are two aspects to your question:
- Code
- Hardware
Have you started any code? If so pleas post it.
What hardware do you have? Can you solder to the pins (if you have pins)?
@mrramz, your topic has been moved to a more suitable location on the forum. Introductory Tutorials is for tutorials that e.g. you write, not for questions. Feel free to write a tutorial once you have solved your problem ![]()
==
- Do you have series resistors in place?
- Because you're tangling stuff together, you might have bad contacts.
Hi, @mrramz
Welcome to the forum.
What hardware have you been given?
Can you post a copy of the assignment/project sheet you were given please?
What model Arduino are you using?
This might help if you are a beginner;
https://create.arduino.cc/projecthub/SBR/working-with-an-led-and-a-push-button-71d8c1
Thanks.. Tom...
![]()
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.