Ever wanted to make your own gameconsole? In this blog I will show you how I build one with a Raspberry Pi running Retropie. Retropie is an Operating System on which different simulators are installed to run different kinds of (retro) consoles. The lid of the gameconsole is controlled by a stepper motor.
To build this gameconsole the following components were used:
The Raspberry Pi must be installed with Retropie OS. Instructions to do so can be found here
To control the lid it is necessary to use a (in this case python) script, this script can be executed by various ways; In this blog a cronjob which is executed at reboot will start the script that controls the lid. To do so the following steps must be executed:
Connect to the Raspberry Pi through SSH (the default username is pi and password is raspberry). To do so you need a SSH client and you need to know what the IP address is of the Raspberry Pi.
Once connected execute this command to create the script
sudo nano /home/pi/script.py
Copy the contents of the script (found in download) to this file and press CTRL+X, then Y and enter to save the contents. Now you can open crontab by entering the following command:
sudo crontab -e
If you're asked to choose an editor: Choose nano and enter the following line
@reboot python /home/pi/script.py &
Press CTRL+X then Y and enter to save the script
The case in this example is printed in PLA (Black and white), however other materials can be used to print it as well. The STL files can be found in the download at the bottom of this page. The electronics can be mounted on screw thread which can be melted into the case. For example a soldering iron can be used to heat it up. The motor can be mounted in the top half of the case after which the pulley and belt can be installed.
The electronics have to be connected like this:
- Push button button to GPIO 2 and 3,3V - If you have a button with backlight leds in it, they have to be connected to the right voltage as well (in this case 5V) - The stepper motor driver must be connected to the following pins: - IN1 -> GPIO26 - IN2 -> GPIO19 - IN3 -> GPIO13 - IN4 -> GPIO6 - The USB hub can be simply connected to one of the USB ports of the Raspberry Pi
© Prompt. All rights reserved. Crafted by Kevin Assen