Workout Games

by _Marcel_ in Circuits > Arduino

789 Views, 14 Favorites, 0 Comments

Workout Games

Squat Pole Demo

This is about doing exergames (exercising games) where you move the game character by doing squats. That way you get fitter while you play. You can lose weight from doing squats because it trains your leg muscles and since you have a lot of muscles in your legs you burn more fat.

The games use a pole that holds a sensor that can detect your squats.

This squat-pole uses a time-of-flight sensor because that sensor is very responsive and very accurate. I made some earlier prototypes that worked with ultrasonic sensors and with a IR-sensor but the best sensor turned out to be the sensor of type VL53L0X.

Supplies

1x Arduino Leonardo

1x VL53L0X sensor

1 piece of PVC pipe approx. 1.30 metres (50 inches)

1x yellow LED, 1x green LED, 2x 220 ohm resistor, 1 push button switch

1x 3d printed objects to create the sensor pole

The Hardware

Schematic.png
PaalDradenBovenkant.jpg
PaalDraadjesSolderen.jpg
zPaalCloseup.jpg

The hardware consists of an Arduino Leonardo (with the sensor and other electronics) that sends keystrokes to the PC if the user performs a squat.

With the push button you can switch on/off the sending of keystrokes. You'll definately need this so that you can leave the USB plug plugged in when you are not gaming. The green LED shows the on/off state of the device.

When a person is in front of the pole the yellow LED is on. This is a visual indication that the sensor is working correctly. Also the yellow LED helps you to set up the pole correctly: place the pole behind the gamer or to the side of the gamer (the gamer is standing).

Hook up the push button switch, 2 LED's+resistors and the VL53L0X sensor to the Leonardo according to the schematic diagram. If you require any help, just ask me.

The VL53L0X sensor is mounted on top of the PVC pipe so that the sensor can see the body (chest height) of the gamer.

3D Printed Objects

SquatsensorAssembly.jpg
PaalKastje.jpg
Paal.jpg

To finish everything neatly you can print the parts to create the pole. The parts consist of a case for the Arduino Leonardo and a holder for the sensor. The sensor holder is to be mounted on top of a PVC pipe of 1.30 metres/50inches. You can also use to shorter PVC pipes (as long as the total heigh is approximately 1.30m/50inches) and connect the shorter pipes with the 3d printed pipe extension.

The Leonardo, LED's and pusb button are mounted on a 3d printed case that forms the base of the pole.

The 3d files have been made by OpenScad. You can download the OpenScad file.

Play Games

Schnappi-squat.png
Pong-squat.png

You can create games using Scirra Construct, GDevelop, Unity or any other game engine that you prefer. Trap the Control key to see if the user is in front of the sensor.

Or play one of the ready made games straight away:

Schnappi or Crocodile: catch all the fish. Do a squat to close the mouth of the crocodile. You must close the mouth to avoid the bombs.

Pong: play retro tennis to the computer. Squat to move your paddle.

If you have muscle pain in your legs after a while, don't blame me!