This is the Arduino Leonardo Code accompanying Flappy Cycling and Quake 3 Fitness Edition, which have been part of a master thesis study conducted at the Alpen-Adria University (AAU), Klagenfurt. The sketch converts Ergometer, Pulse Handle and Pulse Sensor input to Keybard presses and features two modes, one for each game.
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
- A suitable ergometer -- for developing Ultrasport F-Bike 150/200B was used.
- Pulse Sensor from pulsesensor.com.
- An Arduino device -- the files are configured for Arduino Leonardo, but can be reconfigured (see below).
- A breadboard to build the circuit on.
- Cables, plugs and soldering tools to connect the ergometer to the breadboard -- for Ultrasport F-Bike 150/200B a female TS and TSR jack were attached to the two male output jacks. Optionally the rather short cable of the pulse sensor can be extended.
- Set up following circuit and plug in ergometer jacks as well as pulse sensor:
- Plug in a contact breaker cable from digital PIN 4 to GND, in order to enable manual interruption of the keyboard functionality (key presses can be disturbing when games are not running).
- Change interruptSetup() in (Interrupt.ino) to work with your Arduino -- setup instructions can be found in (Timer_Interrupt_Notes.ino).
- Configure the sketch to work with Flappy Cycling or Quake 3 Fitness Edition by changing the cfg variable in InputConverter.ino.
- Compile and Upload code to Arduino
- Flappy Cycling Mode (cfg=0): presses 'x' key on every ergometer pedal cycle or 'z'/'c' keys on pulse handle touch
- Quake 3 Arena Mode (cfg=1): presses 'x' key on every ergometer pedal cycle or 'h' key on puls sensor heart beat