To relive this experience or enjoy it for the first time (without buying a full game or console), you can use a Raspberry Pi and a microcontroller to duplicate the features of the game.
Stats
Time: 2-3 hoursMaterial cost: $100-$140Difficulty: moderate
Materials
Raspberry Pi 4StepMania dance softwareCircuit Playground ClassicMicro SD card (8GB or more)HDMI monitorMicro-HDMI cableUSB-C power supplyAdafruit I2S three-watt speaker bonnet2 speakers (4-8 ohms)GPIO riser or extension cableMicro-USB CableTwo pieces of upholstery material in contrasting colorsThreadConductive threadCrimp-on ring connectorsFour-way terminal block4 (6 millimeter-long) 2.5-millimeter bolts4 (2.5-millimeter) nutsVarnish or nail polish(Optional) duct tape
Tools
USB (Type A) keyboardUSB (Type A) mouseCrimp tool (or pliers)Internet connectionSoldering iron and solderSewing needle
Instructions
- Set up your Raspberry Pi. To do so, you’ll need to plug the keyboard and mouse into it and connect it to the monitor with the Micro-HDMI cable. Copy the Raspbian Buster operating system onto the SD card, ensuring you use the one that includes a desktop—you’ll need it to use StepMania. Insert the SD card into the Raspberry Pi and plug in the USB-C power supply. Follow the instructions to install the operating system and to connect to your Wi-Fi network.
Note: Once the project is complete, you’ll be able to manage without the mouse and keyboard, as their functions will be fulfilled by the Circuit Playground and dance mat.
- Install StepMania. Start a terminal session using the >_ icon at the top of the screen. From here, enter the following commands to install the software:
Note: StepMania has been ported to the Raspberry Pi by Matthias Rozensztok.
- Reboot the Raspberry Pi. Once you do, StepMania will start automatically.
Note: See StepMania for Raspberry Pi for advice on using alternative sound cards, mapping for different controllers, and performance benchmarks.
- Boost the sound. The Pi’s sound capability is a little lacking, but it can be improved by an add-on. The Adafruit speaker bonnet can run two small speakers. Solder in the two screw connectors that came with the bonnet kit and screw the speaker wires into the connectors.
Note: You can buy pre-soldered speakers for the bonnet.
- Separate the bonnet and the Pi. Without space between them, the bonnet may contact the pins on the Pi, potentially damaging one or both pieces of hardware. To avoid this, connect a GPIO riser or a ribbon cable between the two.
Note: Having a cable to mount the bonnet gives you the option of adding a heatsink. The Pi will slow down if it gets too hot. If you find this happening, you can buy small, stick-on heat sinks to keep the temperature below 176 degrees Fahrenheit (80 Celsius).
- Install the driver software for the bonnet. Use these commands:
- Ensure the sound comes out of the bonnet. Installing StepMania will configure the Pi to have USB sound by default. To remove this and get the sound to come out of your speakers, run the following commands:
- Reboot the Pi to get the sound working properly.
- Set up the Arduino software. Start a terminal session with the >_ icon and install the software with the following commands:
Note: There are two variations of the Circuit Playground board. This project uses the cheaper “classic” board, but will also work with the newer “express” board. The classic board uses the C programming language and can be coded using the Arduino Integrated Development Environment (IDE).
- Install the Adafruit Circuit Playground library. Launch the Arduino IDE and choose Tools > Manage Libraries. In the library manager, search for Circuit Playground. Install it.
- Load the Dance Controller software. The controller software is written in C. The disco lights are provided by its onboard multi-colored LEDs and the dance mat contacts use the board’s touch sensors. Use a terminal session to download the code as follows: Then, plug the Circuit Playground into the Pi with the Micro-USB cable. Open the DanceController.ino file in the Arduino IDE and click the right-facing arrow near the top-left corner of the IDE to upload the compiled code to the Circuit Playground.
- Make the dance mat. Because you’ll be stepping all over it, you’ll want to use a square of tough material such as upholstery or denim. Choose a contrasting color for the triangles. Stitch the triangles in place using a needle and regular thread.
Note: If you’d like, apply a black and yellow “caution-style” tape border along three sides of your mat, leaving the edge that faces the screen untaped so it doesn’t interfere with any wires. There’s no real functional advantage to the tape, but it will make it look nicer.
- Using the conductive thread, make large stitches all over the triangles. The aim is to ensure that wherever the dancer steps, they’ll make contact with the thread. We used a catch stitch—a herringbone-shaped stitch that covers a large area with a small number of stitches. Feed the ends of these areas of conductive stitching out to the edge of the mat.
- Connect the conductive thread to the Circuit Playground. Use solder tags or crimp-on ring connectors screwed into a terminal block and tie the thread onto the loops. Add varnish or nail polish to provide insulation and to stop the knots from coming undone. You can use the same tags or crimps on the other ends of the cables, and use the 2.5-millimeter bolts to connect these to the pads of the Circuit Playground.
Note: The code is configured so that pin 0 is up, pin 1 is down, pin 2 is right, and pin 3 is left. Ensure you connect the right pads to the right pins.
- Play the game. Connect your Pi to a suitable monitor and connect the bonnet and the Circuit Playground via USB. Turn on the Pi, and if it’s all working, it should boot straight into StepMania.
Note: You might need to adjust the settings to configure the game to use your entire screen. Navigate the menu with the up and down arrows; use the left button on the Circuit Playground to select and the right one to exit.