Convert an Exercise Bike Into a Video Game Controller to Get Off the Couch - Hackster.io

2022-08-20 01:43:27 By : Ms. Penny Xiong

Please ensure that JavaScript is enabled in your browser to view this page.

If we were honest with ourselves, most of us would have to admit that we don’t get enough exercise. If that is true for you, it is probably because you feel like you don’t have enough time or energy; the last thing you want to do after a long day at the office is work out — you just want to flop onto the couch and watch TV or play a video game. But if you can combine exercise with something you actually enjoy, that could make a difference. One way to accomplish that is by following this tutorial to convert an exercise bike into a video game controller.

This is a great idea if you like playing games, because it lets you get some exercise while doing something you want to do so you don’t feel like you’re losing out on video game time by working out. And because that exercise is tied to your in-game performance, you get a strong incentive to build up a sweat. In this case, you can tie your peddling motion to any video game action you choose. If, for example, you like racing games, then you can make the throttle control proportional to your peddling speed. If you prefer MMOs, you can peddle to move forward or to cast a spell. Of course, there are also buttons for other controls that you want to activate with your fingers, such as steering.

To perform this conversion, you will need an ESP32 development board, a 0.96” OLED screen, TP233 capacitive touch modules, and a few other miscellaneous components. It should work with any exercise bike that has a speed display. Those bikes monitor peddling speed with a Hall Effect sensor. By connecting the two wires from that sensor to the ESP32, you can count every revolution. By timing the interval between revolutions, the ESP32 can calculate peddling speed and use that to set trigger pull or joystick position. If your bike has heartrate monitors in the grips, you can convert those into touch sensors for controller buttons. If it doesn’t, you can use foil tape to add them.

The demonstrated ESP32 libraries will let the development board connect to a PC, smartphone, or tablet as a Bluetooth gamepad. That means you can play any game on those devices that supports gamepads, though you are limited by the number of inputs and so you probably won’t be able to play Fortnite unless you get really creative. The ESP32 also shows the current peddling speed or distance on the OLED screen, so you can see the fruit of your cardiovascular labor.