I was looking at getting a spring loaded toggle switch, but the only ones I found were 125v/250v. Am I correct in thinking these won’t work with an arduino? Or is that just the maximum voltage that can run to it.
I need to turn on and off a red light a buzzer and a motor with a switch without a code. I had a lot of problems with that. Everything work separate but when i connect the arduino with a code (involving a gaz sensor) everything keeps turning on even if the switch is off and the sensor didn't sens anything. Please can you help me i have a presentation at the end of this week
WOW This is exactly what I was looking for. Can you use this same type of code for multiple pins? I am new to code and trying to set up something that would be more advanced. Can you tie the 1 pull down resistor to several input pins? Do you do any teaching on Arduino?
yes, but you have to write PINMODE and DIGITALREAD separately for each pin. you need a separate resistor for each button otherwise one button could end up switching all of the pins HIGH. I work at CIJE and we develop STEM curriculum.
@@rufustoad1No, you can use as many as you like on the same ground pin, but each switch must have it's own resistor going to ground. each switch can be connected to the same 5V port. and each switch should go to a separate digital pin.
Excellent. I got mine working FINALLY thanks to this video. Have you thought about another video with 3 or 4 switches turning on 3 or 4 different lights and how to make code for that? Seems that if a guy could figure out a few of those switches it would be endless on what you could add including limit switches. OR would you just copy this and add several different pinModes etc?
correct this is the basis for almost any device, buttons and switches. adding more would just be repeating this exact circuit and code. you have to add PINMODE for each pin you are using, and a separate circuit for each button/switch
Can i connect 3 pin ignition switch? Im not sure how to do this (BAT, IGN, START)
I was looking at getting a spring loaded toggle switch, but the only ones I found were 125v/250v. Am I correct in thinking these won’t work with an arduino? Or is that just the maximum voltage that can run to it.
yes, they are all fine. the voltage rating is the maximum. we are only using 5V. a switch is just a device that connects two wires together.
I need to turn on and off a red light a buzzer and a motor with a switch without a code. I had a lot of problems with that. Everything work separate but when i connect the arduino with a code (involving a gaz sensor) everything keeps turning on even if the switch is off and the sensor didn't sens anything.
Please can you help me i have a presentation at the end of this week
hi teach‘,is that wire connected from D2 to the ground called pull down resistor?
yes the resistor is called a pull-down because it pulls the digital pin (D2) down to ground (0 volts)
Super helpful! Thanks!
you're a godsend. thanks for actually explaining everything!
a month later and I'm back for the parts I didn't get at first. I love this video, it's so concise and explains in such simple terms!
thanks for sharing!
you saved me!
WOW This is exactly what I was looking for. Can you use this same type of code for multiple pins? I am new to code and trying to set up something that would be more advanced. Can you tie the 1 pull down resistor to several input pins? Do you do any teaching on Arduino?
yes, but you have to write PINMODE and DIGITALREAD separately for each pin. you need a separate resistor for each button otherwise one button could end up switching all of the pins HIGH. I work at CIJE and we develop STEM curriculum.
@@adamjerozolim800Thank you for the reply. Is there a limit on the number of switches you can use on 1 ground pin?
@@rufustoad1No, you can use as many as you like on the same ground pin, but each switch must have it's own resistor going to ground. each switch can be connected to the same 5V port. and each switch should go to a separate digital pin.
@@adamjerozolim800Thankyou Adam you have been very very helpful. Hope to see an few more videos for beginners!!
Excellent. I got mine working FINALLY thanks to this video. Have you thought about another video with 3 or 4 switches turning on 3 or 4 different lights and how to make code for that? Seems that if a guy could figure out a few of those switches it would be endless on what you could add including limit switches. OR would you just copy this and add several different pinModes etc?
correct this is the basis for almost any device, buttons and switches. adding more would just be repeating this exact circuit and code. you have to add PINMODE for each pin you are using, and a separate circuit for each button/switch
Thanks alot