lately

I strapped sensors to my legs to see if I run like Kipchoge

Brian Stever

2023 · Expo, React Native, BLE, ESP32, motion data

The short version. Gaitr was going to compare my running, live, against a model of Eliud Kipchoge's stride built from race footage. I never finished it, but it got further than a sketch: there's a full Expo/React Native app with Bluetooth device pairing, live graphs, a performance report and a bundled kipchoge_gait_data.json reference file. It didn't become a polished product, but it was a very efficient way to learn that “hardware plus biomechanics plus mobile plus wireless” is four projects.

1A bad runner with opinions

I'd started running that summer, badly but consistently, and watched enough Kipchoge footage to have opinions about stride mechanics I had absolutely no right to hold. So I wondered whether I could measure my running form in real time and compare it to Eliud Kipchoge's. That sounds like an idea that ends as a sketch in a notebook. It became my first serious hardware project instead.

The appeal was obvious. Running form is hard to judge while you're running, and expert coaching is expensive. If something you wear could capture enough body motion to say “your stride is asymmetric” or “your hips are collapsing” as it happens, the phone in your pocket becomes a very opinionated coach.

The catch is that it needs electronics, Bluetooth, biomechanics, mobile development and motion analysis all at once. I had very little experience with any of them, which in hindsight explains why the idea felt so clean and why I was so sure of it.

2The plan

The plan was to strap seven ESP32 sensor nodes to my body, each talking Bluetooth Low Energy (BLE), stream their accelerometer data to a React Native app, and compare it against a model of Kipchoge's gait pulled from video and built in Blender. The app would work out a similarity score and give feedback live.

I called that score the Kipchoge Similarity Index. Naming a metric before you've built the thing that produces it takes a lot of confidence.

The part I'm still proudest of is the reference data. I brought race footage of Kipchoge into Blender, stabilized the video, ran motion tracking on his body and exported the joint positions as a dataset the app could compare against in real time. I'd never used Blender for anything before this. The learning curve was vertical, but by the end I had the best marathon runner on earth, mid-stride, stored as JSON on a phone. That felt like a real thing.

Live Sensor Feed

Reference Model

171°158°163°
pelvisleft/right hipsleft/right shinsleft/right feet
Figure 1. How Gaitr was meant to work, drawn rather than recorded. On the left, a runner wearing the sensors, as the live feed would see them. On the right, the reference skeleton taken from video.

3What I actually built

I tend to remember Gaitr as a wild idea with a few sensors attached. The code says otherwise. There's a device connection flow, a BLE manager, screens for real-time analysis and performance reports, charting libraries and a serialized Kipchoge reference dataset. That's enough structure that the app had started turning into a system instead of a mood board.

The hardware meant buying soldering gear, a pile of ESP32 boards, MPU6050 accelerometers, a glue gun and velcro straps, and 3D printing cases to hold it all together. My desk looked like a RadioShack had a minor incident. Getting the accelerometers reading on the ESP32s went surprisingly well. Getting them to talk to the phone over Bluetooth did not. Pairing, reconnecting and data throughput were all harder than I expected, and most early debugging sessions ended with me staring at a serial monitor, wondering why the phone ignored a device that was clearly broadcasting.

Instead of building voice feedback, I went with beeps: different tones for connected, reading and out of range. Crude, but it meant I could hear what the system was doing while I ran, without looking at a screen. The beeps told me it was alive. Whether they could coach anyone was another question.

Table 1. What's in the app.

ModulePurpose
BLE device managerDiscover, pair, and track sensor nodes from the mobile app
Kipchoge reference dataProvide a machine-readable comparison target derived from study footage
Real-time analysis screensVisualize live motion streams and session state while running
Performance report flowCompress a messy movement comparison into one alarming but motivating summary

The stack says a lot. The app uses Expo/React Native, react-native-ble-plx to talk to the devices, and more than one charting library, because apparently one graphing problem at a time wasn't enough. When the whole point is making invisible body motion readable, the charts stop being decoration and become half the product.

4How far it got

I didn't finish the full system. I did get far enough to show that sensor data could be captured and moved through the early stages of the stack, and that matters. Big projects often die in the gap between the idea and the first believable signal. Gaitr made it across.

It also changed what I thought I could build. Before this, microcontrollers and wearable sensors felt like their own kind of engineering, for people with real hardware benches and sensible plans. After it, they felt hard but doable, which is far more useful.

The rest is where it gets honest. I don't know biomechanics. Comparing my gait to Kipchoge's sounds simple until you list what actually differs: his height and mine, cadence, stride length, hip drop, and the fact that his body has been tuned by decades of elite training and mine for sitting in a desk chair. A beep that says “you don't match” isn't useful when part of the mismatch is anatomy. The feedback needed to be smarter than what I had, and back then I didn't have the tools to make it smarter.

5Unfinished, for now

Gaitr is unfinished. I don't think it's a failure, but I don't want to oversell it either. What I got out of it was less a product than a set of skills I didn't have before: soldering, working with sensors, living within Bluetooth's limits and thinking about movement as data instead of video. I made steady progress the whole time I worked on it, and on projects like this, what I learn along the way is the point.

I do plan to come back to it. The piece I was missing, reading noisy movement data in a way that accounts for individual bodies, is something AI can actually help with now. When I started Gaitr I had beeps and a JSON file. Now there are models that can reason about movement patterns, normalize for body proportions and give feedback that goes beyond “you don't match.” The hardware works. The reference data exists. The gap that stopped me has gotten a lot smaller.

Also, if you ever need a reminder that you aren't Eliud Kipchoge, there are cheaper ways to get one than building a multi-sensor motion analysis system from scratch.