I have made a button box using a button matrix with a pro micro. The buttons i used have LED backlights. I used the following guide
My question i hope is simple (yes im new to all of this and a complete noob). Can I power the buttons LEDs with any of the remaining pins and is it possible to avoid any coding for this?
Im hoping the RAW is just a 5v supply, so i can wire from the raw - to the button LED in parallel - back to the ground pin that's spare on the Arduino.
To clarify, i dont want the LEDs to have "communications" i.e, push button and led comes on is something I don't care about. I'm planning to wire in a toggle switch before the first button so that can be used to break the circuit for a Off/On functionality of the LEDs.
Is this possible? Would this require coding at all?
It sounds like you just want some LEDs to be on. If so, wire an LED with a series current limiting resistor between your source of five volts and ground.
No involvement with the Arduino, no code.
If you have N of those, wire the LED+resistors in parallel and use a switch to on or off a supply of 5 volts to all of them at once.
So I made a button box that has 32 functions like the AMStudio youtube one i put in my OP.
Where he has the 4 red, 4 black, 1 yellow and 1blue button, these are 2 pin momentary push buttons for HIS version. When I made MY button box however, I used 4pined LED momentary buttons.
I have got the button box working exactly as shown in the AMStudios link. This leaves my Arduino Board with some spare pins as they were not needed. The pins left over are the 4 red circled ones in my OP picture.... so I have RAW, GND, RST, and VCC pins with nothing soldered to them leaving them spare
Can I use one of these spare pins to provide the "power" to the buttons LEDs?
so laymen's example would be - Red wire coming from the RAW or RST or VCC of the Arduino then soldered to the led+ pin of the buttons (in parallel) with a black wire coming from the GND of the Arduino soldered to the led- Pins again in parallel. Is this possible with these "spare" arduino pins?
The Toggle Switch I am alluding to is not one that is within the 32 functions. I think of it as an "Additional Switch" which would be wired in first before the buttons so i can turn the LEDs on/off by "breaking" the circuit, rather than using software, ie Arduino coding to operate the LEDs.
Would doing it this way avoid coding, or would i have to do some code to tell the Arduino that these pins are to be used for power only, not any communications.
Apologies for my likely complete novice question asked in a probably over complicated way
after writing my reply, then reading your comment again i feel we are on similar lines.
If my other post just makes your more confused :D, question on this one....
I think what I'm asking is, where you say " between your source of five volts and ground." and "use a switch to on or off a supply of 5 volts to all of them at once."..... can i not use the spare pins on my Arduino Board to be said supply?
I have looked at the schematic of the pro micro. I assume you are powering this through the USB connector as would be typical for a button box.
It appears that in that case, the Vcc pin can be used to supply some power.
If your pro micro is a 3.3 volt device, this will be somewhat limited, the regulator is rated for 300 mA, the pro micro takes some of that, and using 150 mA as a total limit would probably be OK.
If your pro micro is a 5 volt device, Vcc will be directly connect to the USB V+, so the limit is a good deal higher and mostly depends on the USB port.
So take your N numbers of LEDs and multiply by the current each one needs. Modern LEDs can be quite bright with 7 or 10 mA, I happen to use 470 ohms as a series resistor which puts it in that range, FWIW because Digikey accidentally sent me several hundred and didn't want them back…
Try a few values for a few different currents and see what looks good, or what you can live with, and figure out if that many can be powered in whichever 3.3 or 5 volt board you are using.
If this diagram looks like I drew it with my finger, there's a reason for that.