Reads the input of buttons from GPIO pins on a Raspberry Pi and serves them up through Node.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
index.html
package.json
socket.js

README.md

arcadebuttons-node-pi

Reads the input of buttons from GPIO pins on a Raspberry Pi and displays them on a webpage using Node.js.

Here's a video explanation.

Backstory

I play arcade games (mostly shmups) and sometimes stream on twitch.tv from my arcade cabinet. My JAMMA capture setup is detailed here. I taped a webcam to my ceiling to capture the joystick movements, but its hard to tell what inputs are being made due to poor lighting and my hands being in the way. Other players who play from within MAME can have a nice input display that shows the movements they're making. This project is an attempt at providing that kind of input display for an actual arcade cabinet.

I have a Raspberry Pi under the control panel of my arcade cabinet with the control wires split off and plugged into the GPIO pins. This app provides a nice display that I can use while streaming. This is probably not the easiest or most lightweight way to do this but I wanted to play around with Node.js and the asynchronous nature of human inputs seemed like a good project to learn with.

After upgrading to a Raspberry Pi 2 and using a wired ethernet connection between the Pi and the PC I use for streaming, the lag in the inputs is virtually non-existant and the display is rock solid.

Remote button presses

I recently added the ability to click/tap buttons on the display and have the actual inputs get triggered. Remote control! The idea came about when hanging out with KevinDDR while I was teaching him how to play Ketsui and telling him when to bomb to avoid dying. I thought it would be cool to be able to actually do it for him.