Part

Arcade button

The 30 mm cabinet button with a microswitch under it. Hold it while the simulation runs.

See every part
  • 2 pins
  • 5 settings
  • In 18 projects
  • In 8 lessons
12
Drawn live by the editor's own code, at the size you see it.
At a glance

The Arcade button in brief

What it is, and every setting the properties panel gives it.

An arcade button is the 30 millimeter snap-in button from a cabinet or fight stick, with a lever microswitch clipped under it rather than the tactile dome of a kit pushbutton. Electrically it is two pins and a contact: pressed, the pins are 50 milliohms apart and pass current either way; released, both are high impedance. The usual wiring needs no resistor at all, one terminal to ground and the other to an Arduino Uno or ESP32 pin set to INPUT_PULLUP, so the pin reads LOW while the button is held. Forgetting the pull-up, and reading a floating pin, is the usual first mistake. Mokxi leaves bounce off by default, because a snap-action switch chatters far less than a tactile one; turn the bounce property on and every press makes, rebounds once and settles within 2 milliseconds, the same pattern each time. The size property draws the 24 millimeter button instead, label prints a few letters on the cap, and key holds the button from the keyboard. Plunger travel and click force are not modeled.

Family
Inputs
Pins
2
color
red (or blue, green, yellow, white, black)
the cap color, cosmetic only.
bounce
false
off by default.
size
30 (or 24)
30 (the default) or 24, the two snap-in sizes controllers use. Only the picture changes; the switch is the same.
label
up to five characters printed on the cap, such as LP or Start.
key
a keyboard key that holds the button while the simulation runs, such as u or ;. A controller is played with several buttons held at once, which a mouse cannot do, so give each button its own key and play it from the keyboard. The key is shown in a small badge beside the cap.
Pins

2 pins

Named as the editor names them, so a wire lands where you expect it.

Pin
What it does
1
One side of the contact.
2
The other side.
How to use it

How to use an arcade button with an Arduino

Two wires and no resistor: one terminal to a digital pin, the other to GND, and pinMode(pin, INPUT_PULLUP) in setup(). The pin reads HIGH while the button is up and LOW while it is held. The dino game here puts it on pin 2, one of the Uno’s two interrupt pins, so attachInterrupt() catches a quick tap even while the sketch is busy writing the LCD.

If the microswitch under your button has three tabs, use common and normally open. With normally closed, the button reads as held all the time and released while you press it. Bounce is off by default on this part, as a snap-action switch barely chatters; turn it on in the properties panel to test a debounce.

Part pin
Board pin
2
Pin 2
1
GND

On a Pico or a Pro Micro the wiring is the same, one wire to a pin and one to ground; the tutorial covers which pins to pick on each.

Arduino Uno: dino gamelive0.000 s 0.00x
Hold the button
This is the simulator itself, running here. Click anything to open it in the editor.
A press on an interrupt, as the dino game does it
const uint8_t BUTTON = 2;
void setup() {
  pinMode(BUTTON, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(BUTTON), press, FALLING);
}
How it is modeled

What is true about the Arcade button, here

In its help article’s own words: what the simulation gets right, and where it stops.

Modeled

Electrically it is the plainest part in the library: closed, the two pins are a low-resistance contact passing whatever is on either side in either direction; open, both are high impedance, with no notion of which pin is "in" and which is "out". bounce is off by default here, where it is on for the pushbutton, because a snap-action microswitch's datasheet quotes well under 5 ms of chatter, in practice one or two edges, not a burst.

Not modeled

No mechanical travel or click force beyond the on-screen press. This is the electrical contact, not the plunger's feel.

With bounce on, the chatter is a fixed 2 ms pattern (one make, one rebound, one settle) rather than the varying burst the pushbutton generates, and it is the same on every press. There is no contact resistance drift, no wear and no travel time between the press and the contact.

From Arcade button (30 mm), in full.

Projects

See the Arcade button in a project

18 built-in projects use it. Each opens in the editor, already wired.

Boards

The boards it is shown on

Each of these 5 boards has a built-in project with the Arcade button in it.

Wire up the Arcade button

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.