Source: https://mokxi.com/parts/arcadebutton
Updated: 2026-11-10

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

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.

Hold the button

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

A press on an interrupt, as the dino game does it

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.

Lessons

## Where it turns up in a lesson

8 lessons place it in their own circuits.

### Learn articles

8 lessons

- DIY Fight Stick on an Arduino Pro Micro
- Arcade Button Wiring for a Pro Micro or Pico
- Design Your Own Fight Stick or Leverless Controller
- Design Your Sim Racing Button Box in the Browser
- DIY Rhythm Game Controller: Guitar and Dance Pad
- Arduino Tilt Sensor (SW-520D): Wiring and Code
- Arduino Reed Switch: Wiring, Code and a Door Alarm
- Arduino Stacker Arcade Game on Two LED Matrices

Boards

## The boards it is shown on

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

- ESP32-C3-DevKitM-1
- Arduino Uno R3
- Arduino Mega 2560
- Raspberry Pi Pico
- SparkFun Pro Micro

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Arcade button

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

Start building free Open the editor
