← All projects

2025

I Built a Bike-Powered Minecart to Exercise in Minecraft

I turned an exercise bike into a Minecraft controller. Pedaling in real life drives a minecart in VR while an Ender Dragon chases me.

Hardware
Raspberry Pi + the bike's own sensor
Game
Minecraft in VR
Pace to survive
~300 RPM
Build time
About 2 days
  • Hardware
  • Minecraft
  • VR
  • Game Input

The idea

I bought an exercise bike off Facebook Marketplace to get in shape for an arm wrestling tournament. Its built-in display was bad, so I set out to build my own: one that could send live RPM data over the internet. Once the data was online, I could send it anywhere, including Minecraft.

Reading the bike

Following the wire from the display down to the wheel, I found a magnet near the front axle. That meant there was a hall effect sensor, which works like a switch: the circuit closes every time the magnet passes over it. A Raspberry Pi can count those clicks in code, so I soldered a 3.5 mm jack to some cables and plugged the Pi into the bike’s sensor line.

A case that snaps onto the bike

I modeled and 3D printed a case for the Pi. It took some sanding and a few drilled-out holes for the M3 screws, but the Pi, the jack, and the power adapter all fit snugly. Magnets glued to the bottom hold the whole thing to the bike’s frame.

From pedaling to blocks per second

The Pi runs a small web server that streams the RPM live, and I built a dashboard that graphs it over time. To turn RPM into speed, I use the surface speed formula:

speed (ft/min) = π × wheel diameter (in) × RPM ÷ 12

A Minecraft plugin receives the live data and uses the same formula to set the minecart’s speed in blocks per second. Pedal harder and the cart goes faster.

Turning it into a game

Three more plugins make it a challenge:

  • Track builder: clears blocks around me and lays rails on glowstone just ahead of the cart, so I never run off the track.
  • Dragon chase: an Ender Dragon follows me, and if I slow down, it catches me.
  • Distance tracker: shows how far I’ve ridden.

I played the whole thing in VR, so it felt like I was actually riding the minecart. I used an amplified world to get big, dramatic terrain.

Split view: on the left, the Minecraft view from the headset, riding rails laid on glowstone over a forest; on the right, me pedaling the exercise bike wearing a VR headset What I see in the headset (left) while I pedal (right).

The ride

I had to hold about 300 RPM to stay ahead of the dragon. The route went over mountains, a dark oak forest, and a village, and under a rainbow once I cleared the thunderstorm. The dragon chased me backwards the entire time, because I couldn’t get it to face me in code. In the end a horse wandered onto the track, and the dragon caught me just short of 2 miles.

It’s probably the coolest thing I’ve ever made, and it was a seriously good workout.