https://github.com/noatpad/tetripi
A grad project to develop Tetris to be played on an LED matrix
https://github.com/noatpad/tetripi
raspberry-pi tetris
Last synced: 2 months ago
JSON representation
A grad project to develop Tetris to be played on an LED matrix
- Host: GitHub
- URL: https://github.com/noatpad/tetripi
- Owner: noatpad
- Created: 2023-11-22T06:49:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-06T19:15:47.000Z (over 2 years ago)
- Last Synced: 2025-03-12T15:50:25.166Z (over 1 year ago)
- Topics: raspberry-pi, tetris
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tetripi
> a final project for my graduate Hardware System Design course. in a nutshell, it's a box that plays Tetris! Mostly!

Tetripi is a little program that runs Tetris on a Raspberry Pi, encased in a little arcade box. It makes use of a [16x8 LED Matrix]([url](https://www.adafruit.com/product/2040)https://www.adafruit.com/product/2040) to display the board and some buttons to control the game. It also features a power switch on the side to "turn off" the game (in reality, it is placed in standby mode) and turn it back on. A piezo buzzer is also used to provide audio feedback to the player.
To run the game, simply run on the command line `python tetripi.py` (using Python 3.x) and play as far as you can!
The following components were used:
- [16x8 LED Matrix + Backpack](https://www.adafruit.com/product/2040) (GPIO pins 2 and 3 for I2C) - Displays the tetris board
- [6 LED Pushbuttons](https://www.adafruit.com/product/1439) - Moves, rotates, and drops the active piece on the board. Each button is wired to 2 GPIO pins, one for input and the other for its LED
- Up button uses pins GPIO pin 16 for input and GPIO pin 19 for light
- Left button uses pins 5 and 6
- Right button uses pins 20 and 21
- Down button uses pins 12 and 13
- A button (the right, blue button) uses pins 17 and 18
- B button (the left, blue button) uses pins 23 and 24
- [Slide switch](https://www.adafruit.com/product/805) (GPIO pin 27) - Powers on and off the game
- [Piezo buzzer](https://www.adafruit.com/product/160) (GPIO pin 22) - Provides audio feedback to the player