This article discusses about how to develop simple game pad hardware and interface it with the Raspberrypi board and also about the technique of interfacing a game code written in HTML5 with the game pad.
The Snake game running on a browser window forms the GUI or front end of the entire system. In a Linux operating system each hardware device is represented as a file. The device can be controlled by simply reading and writing into that file. The hardware of an operating system is on the one side and the user trying to access the hardware is on the other side, and in between them there might be several layers of process running which communicates each other using inter process communication methods. In this project there is game pad which is the hardware and there is a process which reads from the game pad and there is also a Pipe file or FIFO in-between the game and the game pad reading process.