What up Arduino community! Getting started on a big project; building a half-scale pinball machine driven by an Arduino Mega.
(Also sorry if this is in the wrong place... couldn't really determine which forum to put this question in.)
The Mega has a lot of pins, but my board has even more components. My first instinct was to cut down on the number of components, but then my inner engineer kicked in and is wondering if there is another way to conserve pins.
A lot of the targets on the playfield consist of just a small momentary button paired with a "shoot this" indicator that lights up or flashes when the target gives a high number of points.
I'm wondering if I can put the LED and a normally-closed momentary button together on one pin. I'm fairly new to Arduino so I'm not certain as to the best way to do this. Would I set a pin to 'digital input', then run power from the 5v pin through an LED and the momentary button into the input pin?
Also, would there be a way to have the momentary button detection still work without lighting the LED? Possibly by allowing only a small amount of current through it, so it only glows very dimly, but with enough current for the Arduino to detect the button being opened?
Here's the target I'm trying to build...
And here's the reason I'm using a Mega and trying to conserve pins...
Any help appreciated! Thanks!