useus
March 31, 2023, 2:43pm
1
Hello everyone, I would like to turn on a single LED every time I press one of the 18 buttons, since I have no more pins available, I wanted to opt for the simplified scheme but before proceeding I would like to ask the experts if it is possible
Thanks!
LarryD
March 31, 2023, 2:46pm
2
Please flesh this out a bit more.
Also, what happens if two or more switches are operated ?
Always show us a good schematic of your proposed circuit.
Show us a good image of your ‘actual’ wiring.
Give links to components.
1 Like
What arduino? UNO, Mega......?
Hello useus
Take search engine of your choice and ask the WWW for 'Diode-Resistor-Logic'.
useus
March 31, 2023, 3:07pm
6
I try to reply to everyone with a message
Arduino pro micro
The buttons simulate some keyboard keys, so each button pull down resistance on the 18 pins.
I searched diode resistor logic but I didn't understand very well
PaulRB
April 1, 2023, 6:13pm
11
Why did you not connect your buttons as a matrix? Then, only 9 pins instead of 18 would be needed. That means plenty of pins for LEDs.
useus
April 1, 2023, 6:33pm
12
To create the matrix I would have to rewrite most of the code.
I should have found the solution using one of the unused pins of atmega32u4. I'll give it a try as soon as I can
PaulRB
April 2, 2023, 8:32am
13
Sounds like you could benefit from a code review. Post it here and the forum can suggest ways to improve it.
But you said
useus:
no more pins available
?
useus
April 2, 2023, 10:03am
14
Hidden pins soldered direct to mcu
In theory they are 5 pins (12 26 32 40 41) + two pins of the leds on the pcb
useus
April 2, 2023, 3:04pm
15
I tried the scheme that I published in the first post and it works, I leave everything as it is just fine.
thank you all!
system
Closed
October 2, 2023, 11:41am
17
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.