O'Reilly logo

Raspberry Pi Blueprints by Dan Nixon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the buttons and joystick with PiPlay

While the ability to use GPIO inputs as input to emulators is planned for a future release of PiPlay, the current version does not support the use of switches connected via the GPIO port as input to game emulators. Hence, we need an additional piece of software to do this.

Fortunately, Adafruit has already written a driver that converts switch signals from the GPIO port to key presses (https://github.com/adafruit/Adafruit-Retrogame), which we will use for our arcade buttons and joystick.

First, we need to install some required programs and libraries that will allow us to recompile the retro game software when we make changes to it; these can be installed using:

sudo apt-get install git libexpat1 libexpat1-dev ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required