Skip to content

A program that lights up arcade buttons according to the buttons used in the game currently being played.

License

Notifications You must be signed in to change notification settings

IgniparousTempest/rpi-arcade-lights

Repository files navigation

rpi-arcade-lights

A program that lights up arcade buttons according to the buttons used in the game currently being played. This pairs up nicely with the custom Arduino arcade controller I made.

Before Retropie boots a game, it first runs a runcommand file. This script can be appended to that file.

./rpi_button_lights.py is the main file, ./test_lights.py can be used to make sure your wiring is correct.

Demo

rpi-arcade-lights.demo.mp4

Alternatively, see on Youtube.

Wiring

Adafruit PCA9685 Raspberry Pi
GND --> GND
OE -->
SCL --> 5
SDA --> 3
VCC --> 3V3

Raspberry Pi Pinout

Adafruit PCA9685

Installation

  1. Enable I2C:

You will probably get this error ValueError: No Hardware I2C on (scl,sda)=(3, 2). So we need to enable I2C via sudo raspi-config > Interface Options > I2C.

  1. Reboot the Pi

  2. Run the following commands:

    Main file

    pip3 install -r requirements.txt cp rpi_button_lights.py /usr/local/bin/ cd /usr/local/bin/ chmod a+x rpi_button_lights.py cd -

    Database

    cp rpi_button_lights_database.csv /usr/local/etc/

    Game launch script

    cp event_hook_scripts/runcommand-onstart.sh /opt/retropie/configs/all cd /opt/retropie/configs/all chmod a+x runcommand-onstart.sh cd -

    Game quit script

    cp event_hook_scripts/runcommand-onend.sh /opt/retropie/configs/all cd /opt/retropie/configs/all chmod a+x runcommand-onend.sh cd -

    Arcade boot and shutdown script

    sudo cp event_hook_scripts/arcade-button-lights.service /etc/systemd/system sudo chmod a+x arcade-button-lights.service sudo systemctl enable arcade-button-lights

Adding new games

Find button configurations by Google Image searching: controls site:gamesdatabase.org.

Add games as a new row in the rpi_button_lights_database.csv file.

About

A program that lights up arcade buttons according to the buttons used in the game currently being played.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published