Cruce Saunders
  • Player card
  • Workshop
  • List
  • Contact
Cruce Saunders
  • Player card
  • Workshop
  • List
  • Contact

Drum Cockpit

May 2026HardwareOpen source

Drum Cockpit from above: a black nine-pad drum mat with white and orange rings, a taped ESP32 board wired to a breadboard on the left, and two drumsticks.
Back to the worldDrum Cockpit
  • Player card
  • Workshop
  • List
  • Contact
  • Back to the world
  • Player card
  • Workshop
  • List
  • Contact

Drum Cockpit

Drum Cockpit turns a nine-pad drum mat into a controller for coding with AI.

Each pad fires an action, from opening a terminal pane to sending a prompt, and while I dictate to the AI I have to keep drumming: stop for two seconds and it stops listening. Between prompts, the same pads play a rhythm game.

I built it in one weekend at Stasis, Hack Club's hardware hackathon in Austin, after Hack Club invited me based on my projects.

commits over the hackathon weekend
2323
of silence before dictation cuts off
2 s2 s
songs in the rhythm game
33

A drum kit for coding with AI

Hack Club is a nonprofit network of teenagers who code, and Stasis is its hardware hackathon: a weekend in Austin in May 2026 to build something physical. By then most of my coding was talking to AI. I dictate what I want with Wispr Flow, a voice-to-text app, and AI coding agents in my terminal do the typing. I wanted a physical controller for that loop, and a drum mat had exactly the right shape: big pads you can hit without looking.

The twist became the whole demo. While dictation is on, you have to keep drumming. Stop for 1.5 seconds and you hear a warning; at two seconds the dictation cuts off mid-sentence.

From a pad hit to an action

A hit travels through three layers. The pad closes a circuit on a microcontroller, the microcontroller reports the pad number over USB, and one Python script on my Mac decides what that hit means, based on which mode the kit is in. The same six live pads run my terminal in one mode and play a game in the other, and one pad switches between them.

How a hit becomes an action

Pad hitPulls its wire to groundESP32-C3Prints the pad number over USBdrummer.pyFilters bounce and cross-talk, mapshits to actionsCoding modeTerminal panes, Enter, dictationGame modeRhythm Rush in ChromeWatchdogWarns at 1.5 s, cuts dictation at 2sPAD 3while dictatingmode padPad hitPulls its wire to groundESP32-C3Prints the pad number over USBdrummer.pyFilters bounce and cross-talk, maps hitsto actionsCoding modeTerminal panes,Enter, dictationGame modeRhythm Rush inChromeWatchdogWarns at 1.5 s, cuts dictation at 2 sPAD 3whiledictatingmode pad
PersonSystemOutput
  • Pad hit: Pulls its wire to ground
  • ESP32-C3: Prints the pad number over USB
  • drummer.py: Filters bounce and cross-talk, maps hits to actions
  • Coding mode: Terminal panes, Enter, dictation
  • Watchdog: Warns at 1.5 s, cuts dictation at 2 s
  • Game mode: Rhythm Rush in Chrome
  • Pad hit to ESP32-C3
  • ESP32-C3 to drummer.py: PAD 3
  • drummer.py to Coding mode
  • Coding mode to Watchdog: while dictating
  • drummer.py to Game mode: mode pad

I rewired the kit at the hackathon

The plan was simple: plug the mat in over USB MIDI, the standard protocol for electronic instruments, and read it from one script. At the hackathon I went lower. I ran each pad's signal wire to its own pin on an ESP32-C3, a thumb-sized microcontroller, with one shared ground on a breadboard, and wrote firmware that prints PAD N over USB whenever a pin is pulled to ground. Real drums are messy, so the Python side filters out stick bounce and the cross-talk you get when a hard hit sets off a neighboring pad. Two wires turned out to fire as a pair, so I made them one pad: the mode switch.

Close-up of the drum mat's edge: colored jumper wires running from the pads' taped connector to an ESP32-C3 board on a white breadboard, with drumsticks beside the mat.

In coding mode, the pads run my terminal

One pad opens a new terminal pane, one cycles between panes, one closes a pane, one presses Enter to send a prompt and one turns on dictation. That's a whole AI coding session, run with sticks: open a pane, dictate the prompt while drumming, hit Enter, move to the next agent. Every setting, from the pad map to the watchdog timing, lives in one config block at the top of the script, so remapping a pad is a one-line change.

The config block from drummer.py: the watchdog set to 2.0 seconds with a 0.5-second warning, and a pad-to-action map for coding mode and game mode.

In game mode, the same pads play Rhythm Rush

AI agents take a while to answer, so I built something to play during the wait. The mode pad flips the kit into Rhythm Rush, a browser game where notes fall down five lanes in time with a synthesized backing track, and you hit the matching pad as each note reaches the line: within 100 milliseconds is Perfect, within 220 is Good. It has three songs, Stack Trace, Race Condition and Heap Overflow, at 80, 120 and 160 BPM, and the results screen ends on lines like 'git push --force on those drums.'

1 of 2
Rhythm Rush mid-song: blue notes falling down five numbered lanes, a PERFECT judgment at the hit line, and a score of 2,900 with a 29x combo on Race Condition.

Rhythm Rush mid-song: blue notes falling down five numbered lanes, a PERFECT judgment at the hit line, and a score of 2,900 with a 29x combo on Race Condition.

1 of 2
See the code on GitHub

More builds

  • GameSchool GameOct 2026
  • AI agentsCrew and JevSep–Oct 2026

Back to the workshop