Introduction: Space Invaders Fitness

About: Goeroe.

Exercising using a trampoline burns calories and keeps you young. To make exercising fun I created this Gamification project.

Using a trampoline you control the defender of the Space Invaders game. Stretch your arms to move the defender and jump up and down to fire bullets to the alien spaceships.

Step 1: Requirements

You need the following software:
A machine (a PC or a Raspberry Pi) running M.A.M.E. with the space invaders game.

1x Gymstick trampoline (or another fitness trampoline)
2x Pull cord switch (like used in bathrooms) - local hardware store
1x Arduino Leonardo + USB cable to connect to the PC or Raspberry
1x LED Green 5mm
1x Resistor 330 ohms
1x Toggle switch
1x Push button
Optional: case for your Arduino leonardo.

The Gymstick trampoline is equipped with a switch that is triggerd when
you jump up and down the trampoline. The switch is on when you stand on the trampoline and off when you are in the air.

Step 2: Install Pull Cord Switches

Connect two pull cord switches (the ones that are used in bathrooms) to the left and right poles of the trampoline. Connect the two stretch cords to the switches. If you stretch out your arms the switches should click.

Step 3: Install Electronics

Wire the switches and LED according to the given schematic diagram:

Connect the switch of the trampoline (the jump detector switch, that came with the trampoline) to pin 7 of the Leonardo. Connect your right and left pull cord switches to pins 5 and 10. Connect a small push button to pin 11 and connect a thumbler switch to pin 3.

The tumbler switch is used to switch the system on or off (the green LED lits when the system is on). When the system is on it may send keystrokes to your PC.

The push button can be used to "insert a coin" which is an operation M.A.M.E. (the game emulator software) needs you to do before you can play the actual game.

Step 4: Load Software

Upload the software (download MAMETrampoline.ino and upload it in your Leonardo).

Connect the Leonardo with your PC and start Space Invaders. You can use the following command line (this command line immediately starts the game without the need to press any other keys):

mame invaders -skip_gameinfo

(Windows: you could paste this command line in a batch file).

Now switch on the system by toggling the thumbler switch, the green LED lits.

Start jumping to fire! And stretch your right arm to move to the right or your left arm to move to the left. I promise you that this is fun and I also promise you that you will get exhausted at the same time. Burn them calories!