Skip to content
/ Tromino Public

Tromino is an engaging, pocket-sized interpretation of the classic Tetris game, designed for the Arduino Uno with an LCD shield. This project explores the intersection of physical computing, game design, and user interaction in constrained environments.

Notifications You must be signed in to change notification settings

QC20/Tromino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tromino Game for Arduino

This project implements a Tetris-like game called Tromino for Arduino using an LCD Keypad Shield.

Tromino Start Screen

Requirements

  • Arduino board (e.g., Arduino Uno)
  • LCD Keypad Shield
  • Arduino IDE

Setup

  1. Hardware Setup

    • Attach the LCD Keypad Shield to your Arduino board.
    • Connect a piezo buzzer or speaker to pin 3 for sound output.
  2. Software Setup

    • Download and install the Arduino IDE if you haven't already.
    • Open the Arduino IDE.
  3. Installing Required Libraries

    • Go to Sketch > Include Library > Manage Libraries
    • Search for and install the LiquidCrystal library if it's not already installed.
  4. Uploading the Code

    • Create a new sketch in the Arduino IDE.
    • Copy and paste the contents of Tromino.ino into the sketch.
    • Create a new tab named pitches.h and copy the contents of the pitches.h file into it.
    • Select your Arduino board type from Tools > Board.
    • Select the correct port from Tools > Port.
    • Click the Upload button (right arrow icon) to compile and upload the code to your Arduino.

How to Play

  • Use the buttons on the LCD Keypad Shield to control the game:

    • Up: Move left
    • Down: Move right
    • Left: Rotate piece
    • Right: Drop piece quickly
    • Select: Toggle sound on/off
  • The game starts automatically after displaying the title screen and high score.

  • Try to complete lines to score points.

  • The game speeds up as you play longer.

  • The game ends when a piece can't be placed at the top of the screen.

Here's a video demonstration of the gameplay: https://github.com/user-attachments/assets/344ea21b-9c75-4db8-89e4-3d428cf4419a

Customization

  • You can adjust game parameters like speed and scoring in the code.
  • The melody can be modified by changing the notes in the melody array.

Troubleshooting

  • If the display doesn't work, check your wiring and make sure the LCD Keypad Shield is properly connected.
  • If there's no sound, verify that the piezo buzzer is connected to pin 3.
  • If the buttons don't respond, ensure the LCD Keypad Shield is properly seated on the Arduino board.

Notes

  • This code uses EEPROM to store the high score, which may have limited write cycles. Consider using external storage for frequent updates in a production environment.
  • The code assumes specific pin connections for the LCD Keypad Shield. If you're using a different shield or custom wiring, you may need to adjust the pin definitions in the code.

Game Screenshots

In-Game Screenshot Game Over Screenshot

Enjoy playing Tromino on your Arduino!

About

Tromino is an engaging, pocket-sized interpretation of the classic Tetris game, designed for the Arduino Uno with an LCD shield. This project explores the intersection of physical computing, game design, and user interaction in constrained environments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published