Hi
I have 3 buttons. Each button turn on a LED.
How can a make a 4 button turn on all 3 LED´s?
So i can control all LED´s individual, but also turn on all 3 at once
Regards
Jakob
Hi
I have 3 buttons. Each button turn on a LED.
How can a make a 4 button turn on all 3 LED´s?
So i can control all LED´s individual, but also turn on all 3 at once
Regards
Jakob
is there an arduino running code ? If so, post your code. Also post a schematic of the button-led wiring.
Dont have any code.I have to make it with just 3 AAA batteries
Here is what i have so far in circuit.io
for (ever) {
Read the buttons.
If button 1 = pressed then light LED 1
If button 2 = pressed then light LED 2
If button 3 = pressed then light LED 3
If button 4 = pressed then light LEDs 1, 2 and 3
}
But you will have to change that circuit to have the button and LEDs connected to Arduino IO.
Dont have any code.I have to make it with just 3 AAA batteries
Oops, I didn't read that.
couka:
Yes, it is possible. You will need 3 diodes and 3 additional resistors to do that.lg, couka
Man, where were you when I was in school having to do my own homework.
couka:
Yes, it is possible. You will need 3 diodes and [s3 additional resistors [/s]to do that.
No extra resistors needed....
septillion:
No extra resistors needed....
Depends if you want them to be the same brightness with the "all leds" button or not - if you do, the resistors in series with the diodes need to be smaller to account for the voltage drop across the diode (this is what's shown in the diagram above). If y
Delta_G:
Man, where were you when I was in school having to do my own homework.
Probably not born yet
To be honest, I just wanted to try out circuits.io. I've never heard of it before.
lg, couka
@DrAzzy, true. But a easier way around that is to include one diode in line with the individual switches
septillion:
@DrAzzy, true. But a easier way around that is to include one diode in line with the individual switches
Which is the same component count.
But the more important reason to use this approach - six diodes and three resistors - is that the brightness is the same if both the "all LEDs" and another button are simultaneously pressed.
Paul__B:
Which is the same component count.
Nope, it's not. You only need one diode for the other switches So 3 resistors and 4 diodes making the component count to 7 instead of 9
septillion:
Nope, it's not. You only need one diode for the other switches
But then the three switches go to an odd point (the one diode) instead of the supply rail, and a different point to the fourth switch.
Clumsy.
Yeah, so what's the problem? It's not a rule all switches have to go to a supply rail...
Here my solution.
You just need 3 additional diodes.
I will draw it in Fritzing if it helps.
Scan-to-Me from pmbad10019.dom1.ad.sys 2016-05-31 120932.pdf (176 KB)
I will draw it in Fritzing if it helps.
That would be GREAT!
cool
Thanks a lot for all the help
it's very appreciated.
Regards
Jakob