Jump, Jump, Jump is a game where the player controls the characters of the game by manipulating the accelerometer and buttons. At the same time, the use of loudspeakers ensures that the background sound and narration can be played accurately. In addition, in order to make the Raspberry Pi and the breadboard look more like a game console, paper shells and other materials are used for packaging and decoration.
The GPIO17 button is used to start or restart the game for the first time. During packaging, this button was deliberately reserved. The reason for selecting it is that when the player is manipulating, it is easier to press this button with the thumb of the right hand, which meets the requirements of human engineering.
The accelerator (LIS3DH) and control board are used for player control. When the player manipulates the control board to tilt left or right, the accelerator will quickly sense the direction and send the data to the Raspberry Pi, and the game character will judge whether to move left or right based on the received data. I2C communication is used between the accelerator and the Raspberry Pi, which is a special form of synchronous communication, which has the advantages of fewer interface lines, simple control methods, small device packaging, and higher communication speed.
Item | Quantity | Price | Source |
---|---|---|---|
Raspberry Pi 4 | 1 | $45 | From Lab |
Packaging for parts | 1 | $2.95 | From Lab |
LIS3DH | 1 | $4.95 | From Lab |
loudspeaker | 1 | $15 | From Lab |