3D Printing/Fabrication Electronics/Development Projects VR/Mixed Reality

Exercise Bike Controller

Parts List

Teensy 2.0 Microcontroller – US$19Teensy 2.0 Microcontroller

Teensy 2.0 uses 5v logic, so is easier to use with a rotary encoder that requires 5-20v. (Other Teensy models work, other than the LC which doesn’t support 5v logic.) 
Official Store – PJRC
 – US$19
Australian Stockist – Little Bird – AU$29

Rotary Encoder – $16Encoder 01

6mm shaft rotary encoder, ~360-400 Pulse/Rotation. – US$16
Ebay Australia – AU$15

3D Printed Parts

Three parts are required: Encoder Gear, Crank Gear, and Encoder Bracket. All are available on Thingiverse.

Encoder Gear 3D print preview

Other Parts

  • Exercise Bike (or other rotation-based exercise equipment)
  • Game Controller (or Keyboard/Mouse)
  • Long releasable cable ties/velcro ties/tape to attach bracket to equipment
  • Long USB cable (optional)
  • Long headphone cable (optional)


PC: x360ce (free)
Mac: ControllerMate (US$25)
Teensy Code: Exercise-Bike-Controller on Github


  1. Print all 3 parts
  2. Attach printed Encoder Gear to the encoder shaft
  3. Remove bike casing and the pedal on the opposite side to the drive belt
  4. Screw printed pedal gear on to crank, and then put pedal back on
  5. Connect encoder to Teensy, either solder pins directly or using a breadboard:
    Red Wire (Pulse): Pin D0 (pin 5 on Teensy 2.0 and in Arduino software)
    Green Wire (Pulse): Pin D1 (pin 6 on Teensy 2.0 and in Arduino software)
    White Wire (+5V): Pin VCC
    Black Wire (Ground): Pin GND
    (These wire colours may change depending on your encoder source – 
    so check your part documentation, or do some testing before soldering to the board)
  6. Use Encoder Bracket and cable ties to attach the encoder to bike frame, so the gears mesh together. Cable ties allowed me to adjust the encoder position to ensure the gears weren’t pressed together too hard
  7. Use some more cable ties/velcro to keep cables away from moving parts
  8. Plug Teensy into your computer with long USB cable

Configuring Software

  1. Teensy – First follow the official TeensyDuino tutorials to get set up and ensure Teensy 2.0 is working correctly
  2. Download the Exercise_Bike_Controller arduino sketch from Github and open in Arduino software
  3. Set the Arduino software to use Teensy as a Joystick under menu: Tools > USB Type > Serial + Keyboard + Mouse + Joystick
  4. Upload the sketch to Teensy (Ensure that “Teensy” is selected under menu: Tools > Port), open Serial Monitor and test that the encoder values are changing when the crank moves
  5. Test your maximum pedalling speed outputs a value of +512, increase or decrease the “speedMultiplier” variable (line 17) if you’d like to pedal faster or slower to output full speed on your controller
  6. Once you’re happy with your pedalling speed, change the “readDelay” variable (line 20) to 5, to make the controller latency faster

PC – x360ce

Connect Teensy and Xbox Controller (or other controller). Copy x360ce into game location (for Rocket League this is: /Program Files (x86)/Steam/steamapps/common/rocketleague/Binaries/Win32/)
When playing without exercise controller, you need to temporarily remove the xinput1_3.dll file, or the game won’t start correctly.


Controller 1: Xbox
Triggers Off (for throttle. remove trigger axis)
Pass through: Off
Combine this controller: Combine into: One
Controller 2: Teensy
IHAxis 1, HAxis 1 – added to triggers or other controller.
Combine this controller: Combine into: One
Options: Allow Combining

Mac – ControllerMate

ControllerMate script is available on Github. The “Bike Controller Axes” page should contain “Wireless 360 Controller” and “Teensy Keyboard/Mouse/Joystick.” If you’re using a different controller, you may need to add the axes yourself.
The “Bike Controller Combined” page should create a virtual controller.

Start your game, and enjoy the exercise!


Video Transcript

Hey there Internet. I’m Jaymis, and I have a project I’ve been working on, that I’d like to share with you.

It’s a game controller that attaches to an exercise bike. It takes your calories, burns them alive, and outputs joystick movements or button presses.
I wanted to create a system that could be used with many different games, would produce forward and backward, analogue-style controls, and which could utilise whatever rotation-based exercise equipment players already own.
My solution uses a rotary encoder connected to a Teensy USB development board, with a 3D printed gear and mounting system that can be customised to different equipment geometries. The circuit requires only basic soldering and electronics skills, and it uses very simple, customisable code. Everything can be put together for around $50 if you have access to a 3D printer, or a bit more if you need to order printed parts.
To integrate with an existing game controller requires 3rd party software which works on PC or Mac. This allows you to combine input from a standard game controller with the bike controller input.
I’ve been super addicted to Rocket League the past year, so I’ve mostly used it to control flying cars, however it works well for games like DayZ, Minecraft, and just about anything that involves plenty of walking or running.
You do lose a bit of in-game dexterity though, as real humans can’t change between forward and backward directions as quickly as in-game characters and vehicles, so if you’re playing online and are concerned about your rankings, it will probably make your scores a little sad.
If you feel that you’d like to convert some of your gaming time into exercise time though, it really is a great solution. I now regularly ride for hour-long sessions without getting bored of exercising, which seems like a Good Thing.
So I’m releasing all of the designs and instructions, to help other nerds to cultivate their own Good Habits.
Good luck. Have fun! (GLHF!), and if you’re interested in future updates or other projects involving gaming, performance, video, art, electronics, music, cooking, and other renaissance nerd topics, please do subscribe, or come find me on the internets.
Corporate Electronics/Development Projects Timelapse/Slow Motion

Brisbane Powerhouse – IRL Digital Festival: Promo

My collaboration with Brisbane Powerhouse continues, with a promo for the 2015 IRL Digital Festival!

Behind The Scenes Electronics/Development Featured Motion Control Music Video Projects

Violent Soho – Saramona Said: Music Video

After the Violent Soho/Graetzmedia single-shot clip Covered In Chrome was nominated for an Aria award, we knew the follow up had to be really special.

Director Dan and I had been discussing if we could use the camBLOCK motion control system to do a low-budget version of the famous “Children Of Men” car chase scene. We did some tests in the back of a van and realised that the robot would be able to move while under acceleration, so we started planning.

Shitbox car purchased and modified. I came up with systems to allow director Dan to control the moco rig live, moving throughout the entire length of the car while he was huddled in the back underneath dirty clothes and sleeping bags. I figured out a quick-release system that enabled the transition between car interior and hectic live performance, which I may have done slightly differently if I’d known that transition would be mediated via my jumping in the passenger door of a moving vehicle.

Behind The Scenes

What followed was one of those wonderful creative experiences that makes the hard work of filmmaking completely worthwhile.

Animation/Post-Production Electronics/Development Music Video Projects Timelapse/Slow Motion

Little Odessa – All Night: Music Video

I’m fascinated by timelapse, and I’ve wanted to shoot someone sleeping for ages. Not in a creepy way, you understand. It’s just that slow-motion and timelapse videos reveal stuff we don’t usually get to see as humans shackled to linear time. As a VJ I do a lot of thinking about different ways of using projection. I’ve used projection mapping in the past on buildings and inanimate objects. So sleeping dudes seemed like a completely obvious next step.

It was surprising how little convincing was required to get Little Odessa on board with the concept. My pitch was “All four of you, asleep in a bed together, with a projector blaring in your eyes. It’s likely to be the worst night’s sleep of your entire life.” They were instantly, unanimously in favour of the idea.

Electronics/Development Music Video Projects

Ball Park Music – Bad Taste Blues Part II: Music Video

Another collaboration between Graetzmedia and the amazing humans of Ball Park Music.

The “house” and “science lab” scenes of this piece were all shot at my home, I invented the ejector-pants, and shot B-cam angles for the performance scenes. (Also: Sneaky bus stop cameo, so I could be on hand to reset the ejector pants between takes.)

Advertising Animation/Post-Production Electronics/Development Motion Control Projects

Penny Skateboards – Plastic Pride: Advertisement

Remember when I made a toaster remotely explode on cue and shoot flaming bread into the air?

Good times.

For this Graetzmedia production I created an animatronic, pyrotechnic toaster, animated the closing logo and motion control camera moves, and did general Shoot Things for a couple of days of silliness around Brisbane. Silliness I was able to immortalise by editing a Behind The Scenes clip:

Bonus Points: The skateboard smashing scene was shot at the house of my good friend Jum. I hope he will use this piece when he eventually goes to sell the house.

Electronics/Development Lighting/Audio Reactive Music Video Projects

Stan Walker – Light It Up: Music Video

The record label contacted Graetzmedia director Dan wanting “lights and pyro” but only had budget to cover a single flame canon.

So I  got to work designing, inventing and fabricating on 3 different setups:

Audio-controlled lighting: With the song stems controlling stage lights.

Flame Tubes: My versions of the classic “Reubens Tube” science experiment, with audio controlling 6 separate channels of propane-tubes.

Sparkler Cannons: To enable model rocket igniters to trigger the difficult-to-burn sparklers, I had to come up with my own mixture of gunpowder.

Animation/Post-Production Electronics/Development Motion Control Music Video Projects

Cowper – Morning Prayer: Music Video

I’m really proud of this one.

Both video and audio for this clip were recorded in a single session at the flood-destroyed Graetzmedia studios in West End, Queensland, Australia.

To achieve a perfect focus pull over the 4-minute staring contest, I modified the camBLOCK moco system to control a follow focus whip. This clip was the first shoot to utilise this technique. Several months later, camBLOCK shipped their official focus/zoom motors.

There is no trickery in the single-shot nature of this piece. Cowper really can keep his eyes open for that long. In the dozen or so takes we shot, I think he blinked in two of them.