The full story
It started on a massage table
The kick drum in my solo set came from a Wazinator stomp box under my right foot, so a whole gig meant standing on my left leg. My left hip and back started paying for it. Talking it through with my massage therapist, swapping legs and moving the pedal didn't fix anything. The real problem was that the pedal is fixed. It sits in one spot, and for two or three hours it's never quite where my foot is.
So what if the beat came from my foot instead of the floor? I thought about tap shoes and a board, then sensors and electronic drums. Electronic drumsticks were expensive and hard to get in Canada. So I opened Claude and typed this.
So here's a project idea. I play guitar and use a stomp pedal with my right leg. Recently I've been experiencing some hip and back issues on my left side, because I spend all the time standing on my left foot while playing and tapping with my right. ... I was wondering if there was something that could be attached to the sole of my shoe that could trigger a beat just like the pedal. Act as an inventor. Well, actually, first scour the web to try to find some sort of trigger tapper like that, or else try to find pieces of electronics that I could pull together to make something I could attach to my foot, so that I could trigger a beat while tapping either of my feet easily.
My first message, trimmed, typos fixed
Research and shopping before any code
Searched before inventing
Nobody sells a shoe-mounted kick trigger: an insole controller stuck in beta for years, a patent that never became a product, a few homemade MIDI shoes.
A cheaper answer first
It suggested flat trigger pads, one under each foot. Fair, but it didn't fix the fixed spot on the floor.
No soldering
Its first parts list was a tiny ESP32 board plus a separate accelerometer. I asked for little or no soldering and got "scrap the parts list", and the M5StickS3: board, motion sensor, battery, screen and case in one.
Finding one in Canada
More back and forth than the code: wrong prices, dead links, a discontinued part, out of stock nearly everywhere. I found one on Mouser myself.
The first evening
Versions 1.0 to 1.6 came out of that same chat in one evening in late August. Each was downloaded from the chat, flashed to the board, and what the board did went back into the chat.
| Time | Version | What changed |
|---|---|---|
| 5:40 pm | v1.0 | Ported to the M5StickS3 with the standard BLE-MIDI libraries. |
| 6:45 pm | v1.1 | Flicker-free display. Crash loop. |
| 6:53 pm | v1.2 | BLE-MIDI written by hand on the chip's built-in Bluetooth. |
| 7:23 pm | v1.4 | On-screen checkpoints. The first version that worked. |
| 10:04 pm | v1.6 | Power management, and the note moved from 36 to 35. |
Then a real project, plan first
After that it became a repository set up with my spec-driven development skill and run in Claude Code: a mission, rules the agent can't break, a roadmap of phases, and for each phase an interview, requirements, a plan and a file that says how done gets proven. All 42 commits carry Claude as co-author.
I recorded the accelerometer on my foot: taps, stomps, shuffling and walking. A replay harness runs the detector over those recordings on the laptop, so a change gets tested on real movement without strapping it on every time. The movement chart above comes from those files.
The detector
It keeps a slow baseline of where the foot sits and fires when a reading moves more than 1.65 g away from it, then ignores everything for 120 ms so the impact's ringing can't double-hit. The baseline freezes during a hit, otherwise the hit drags it up and shrinks its own peak. Velocity runs from 70 to 127, sent as note 35 on channel 10.
Tuned on the foot
More sensitive
My note after first wearing it with a clip mount: "I really need to stamp my foot to get something out of it." The line came down from 2.0 g to 1.5 g, then up to 1.65 g after an odd fire on a shuffle. Replayed, it keeps every soft tap, and the shuffling recording (made with the sensor in a sock) still fires zero times. At the first setting it caught 39 of about 40 recorded taps; lowering the line recovered the four soft taps it dropped.
Faster
It used to wait 13 to 15 ms for the true peak. It now fires on the crossing. It asks the iPad for a 15 ms Bluetooth slot, and the accelerometer, never configured and stuck on its 100 Hz default (the 188 Hz we'd quoted was the gyro), now runs at 400 Hz. Between 38% and 51% of the recorded samples had been repeats.
A dark screen and an honest battery gauge
The screen stays off unless the side button wakes it. A boot counter shows if a stomp ever resets the board. The battery shows CHG while charging and a smoothed figure that only goes down, and it learns time left from one full run.
Problems along the way
Bluetooth libraries crash-looped
The usual BLE-MIDI and NimBLE libraries either wouldn't compile or crash-looped the board. Every version is pinned exactly now.
Speed costs battery
A short Bluetooth interval keeps the chip awake. Slowing the main loop to save power dropped detection from 9 in 10 taps to 6 in 10, because a tap's peak only lasts a sample or two. Reverted.
Heel-down dropped
Dropping a heel looks exactly like a step, so the gestures are tap and stomp only.
Hardware ruled out
An ESP32-C6 board (same power limit, no accelerometer), the M5 Capsule (same battery), and a battery base that weighs 90 g, a brick on a foot.
- M5StickS3
- ESP32-S3
- BMI270
- BLE-MIDI
- Arduino C++
- bs-16i
- Claude Code
- Spec-driven development
