I am seeking any advice on an issue I am having with a project. I am a beginner with circuitry and electronics, so please bare with and correct my ignorance and misuse of terminology!
I am making a simple interface with 6 buttons. Each button has a 3mm white (~3.2-3.4v) led inside it. The buttons work by connecting the VCC (3.3v from arduino mega) to a wire that goes into a digital pin and a resistor (220 ohm) that goes to the arduino ground. I’ve attached a screenshot of the schematic for one button/led pair. Now I have made the same circuit but for 6 led and “buttons” and they all share the common ground.
When I tested with one, it worked fine (when the wires in the button touched, the digitalPin immediately read “1” and when released in read “0”). However, when I wired up all six, they work except when I release the wire it takes about 5-10 seconds for the digitalRead to drop back to “0”. I will add that even when the led’s are not connected to the circuit, the buttons still hang at “1” when all 6 are connected. I hope this makes sense!
Why is this? I can make guesses, but I’m sure I am far from understanding the problem. Do I need to insert a diode between the common ground and each switch? Any guidance or advice is greatly appreciated!! I feel a little lost about how to move forward.