LED arcade button
A 30 mm arcade button with an LED lamp inside: a microswitch on two tabs and a lamp with its resistor on the other two.
Aliases: illuminated arcade button, lit arcade button, LED push button. The switch and the lamp are separate: pressing it does not light it. The sketch decides, which is what lets a game flash the button it wants pressed.
Pins
| Pin | What it does |
|---|---|
1, 2 |
The microswitch, a plain contact, closed while pressed. |
L+, L- |
The lamp. Its resistor is in the holder, so it goes straight across its rated supply. |
Wiring it to an Arduino
1to an input pin withINPUT_PULLUP,2to GND: a press readsLOW.- For a 5 V lamp,
L+to a pin andL-to GND. A red one draws about 19 mA, which a pin can give, andanalogWrite()dims it. - For a 12 V lamp, switch
L-with a transistor from a 12 V supply.
Properties
| Property | What it sets |
|---|---|
color |
The cap and the LED: red, green, blue, yellow or white. |
lamp |
5V (150 ohms in the holder) or 12V (470 ohms). |
bounce |
One rebound when it closes, as a microswitch gives. Off by default. |
size |
30 (the default) or 24. Only the picture changes. |
label |
Up to five characters printed on the cap, such as LP. |
key |
A keyboard key that holds the button while it runs, so several can be held at once. |
While it runs
Hold the pointer on the cap to press it. The cap glows with the lamp's brightness.
What the model gets right
The lamp is the bench's LED model for its color in series with the holder's resistor, so it is a diode: wired the wrong way it stays dark, a white or blue lamp drops a volt more than a red one and is dimmer on the same supply, and a 12 V lamp on 5 V barely glows. The switch is the arcade button's microswitch.
What it does not model
Lamps with no resistor (the bare LED kind), and heat.
See it in action
Lit button breathes the lamp and counts presses on an Uno. Open it at /templates.