The idea is to connect an exercise-bike to a Raspberry Pi. The cyclist then is the warp drive and speeds through the stars.

Similar projects worth following
Star-cycle lets you cycle through a star-field. In addition to a three dimensional star-field, the Raspi displays some information regarding your performance is displayed: The speed, the distance, an estimation for the energy used, the current date and time (in a somewhat strange stare-date format) and the time you are cycling.
The program is written in Java, using the BlueJ-environment provided on the Raspberry Pi. It was developed on (and for) model 2B, but since one of its cores is more than sufficient even using high display resolution, it probably also will run on the older models.
Only very limited hardware skills are needed and it should be possible to use nearly every exercise-bike model.


The sole signal needed by star-cycle is a pulse on one of the Raspi's IO-ports on every revolution of the pedal levers. My exercise bike has a tachometer generator, consisting of one reed-switch that is closed once per revolution. Normally, this switch is connected to the exercise-bike’s board-computer (via a mini TS-plug). For use with star-cycle, it is connected to the 3.3V pin and GPIO 7 on the Raspi's pin-head.

If your exercise-bike doesn't provide such a switch (or you don't want to modify it's circuits), it should be easy to add an external switch to the exercise bike: Simply glue a reed-switch somewhere near one pedal lever and stick a magnet to the lever so that the lever closes the switch once every revolution. The switch is then connected to the 3.3V signal and the GPIO 7 signal on the pin-head.

WARNING: Do not connect your exercise-bike’s circuitry directly to the Raspi unless you know exactly what you are doing, since both devices can be damaged that way.


The software is provided as a BlueJ project. The BlueJ-development environment, including the library necessary for using the Raspi's GPIO pins (namely pi4j), is already installed on recent Raspian versions.


Instructions for project "Star Cycle"

Adobe Portable Document Format - 151.41 kB - 10/21/2016 at 14:10



Executable for project "Star Cycle"

Java Archive - 165.86 kB - 10/21/2016 at 14:07


Source and (BlueJ) project file for project "Star Cycle"

x-zip-compressed - 163.24 kB - 10/21/2016 at 14:06


  • 1 × Raspberry Pi 2
  • 1 × Exercise bike
  • 1 × Reed switch
  • 1 × Magnet Inductors, Chokes, Coils and Magnetics / Fixed Inductors, Chokes and Coils

View project log

  • 1
    Step 1

    See document "StarCycle.pdf"

View all instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates