A treadmill that fit the way I wanted to use it
I converted a regular running treadmill into an under-desk treadmill and gave it an API. First came “OK Google” voice control; later, I built a web frontend. It was a lot of work, and a lot of fun.
I wanted to keep moving while playing Overwatch. The finished setup had two sides: sit on the right, walk on the left. I could raise the desk, slide my mouse mat and controls across, and swing the monitor over.
The project brought together the physical conversion, the electronics, and the software. The original build album follows that process through the wiring, controller, and finished desk setup.
The conversion was physical, too. The treadmill’s uprights were welded on and would have stopped the desk from lowering. Removing them, with help from friends and family, was one of the harder parts of the build.
Giving the treadmill an API
A Raspberry Pi Zero W connects the treadmill to a Node.js and Express API. Requests for speed and incline become control signals to the machine.
The hardware build used a prototype board, a logic-level converter, and a step-down power module for the Pi. The controller repository preserves the hardware notes alongside the software.

The actual motor and controller assembly during the build, from my original album.
Getting the motion right
Getting the belt to move was a milestone. Making it respond properly took more measurement. I timed the original console’s acceleration, then used slow-motion recordings to compare rotations at known speed settings with the Pi’s output.
Those experiments became calibration notes and gradual speed changes in the code. The first successful speed-control test is still in the recording, including my very excited reaction.
“OK Google,” then a browser
The voice integration used Dialogflow and Google Assistant. Its commands covered starting and stopping, going faster or slower, changing the incline, and asking for the current settings.
I named it Dr. Treadmill. The original voice demo shows it starting the belt before I had even built the web interface.
One design problem was teaching the interface what ordinary phrases meant. In “go slower,” a single word identifies both the setting—speed—and the direction of the change. I wrote about that Dialogflow problem while building it.
Later, the web interface put those controls in the browser. It also added interval training: starting and ending speed and incline targets that the interface cycles between over time. Making a manual adjustment ends the current interval.
The source includes experiments with Bluetooth heart-rate data, too. Those remain part of the project’s exploration, rather than a finished feature claim.
Letting chat turn up the hill
Once the treadmill had an API, I connected it to Twitch, too. A viewer’s bit donation could increase the incline while I played. I shared that interaction in my original project post, along with a short demonstration.
The build, in my own words
I recorded a long Twitch stream explaining how I built it. The original stream and YouTube archive sit alongside the photos and code as a record of the project.
The photos and recordings are from the actual build. The voice integration is described as it existed at the time.
