This is an old revision of the document!


Tetris

Introducere

Prezentarea pe scurt a proiectului vostru:

  • ce face
  • care este scopul lui
  • care a fost ideea de la care aţi pornit
  • de ce credeţi că este util pentru alţii şi pentru voi

This project involves the implementation of the classic Tetris game on an Arduino Uno platform, using an OLED display for graphical output, physical buttons for controlling the game pieces, and a buzzer to provide audio feedback. The system is designed to be fully interactive and responsive, replicating the retro gameplay experience using minimal hardware resources.

The main goal was to create a complete and functional embedded game that integrates basic peripherals and reinforces practical skills acquired during PM labs. The idea stemmed from our desire to bring a nostalgic game to life using modern embedded techniques, showcasing how even simple microcontrollers can be used to recreate iconic games. It also serves as a valuable educational tool—for ourselves, as a learning opportunity in hardware-software integration, and for others, as a straightforward example of an embedded application that is both engaging and technically relevant.

Descriere generală

O schemă bloc cu toate modulele proiectului vostru, atât software cât şi hardware însoţită de o descriere a acestora precum şi a modului în care interacţionează.

Exemplu de schemă bloc: http://www.robs-projects.com/mp3proj/newplayer.html

Module Descriptions:

  • User Input (Buttons):
    Four physical push buttons allow the player to control the game: one to move the Tetris piece left, one to move it right, one to rotate it, and one to start or restart the game.

  • Input Handler (GPIO):
    Reads the state of each button using digital input pins. It debounces the signals if necessary and forwards user actions to the game logic (e.g., move, rotate, or start the game).

  • Game Logic Manager:
    The core of the application. It manages the game state including piece positions, rotation, collision detection, grid updates, score keeping, level tracking, and game over conditions. It responds to user input and controls overall game progression.

  • Display Controller (OLED - I2C):
    Handles visual output on a 128x64 OLED display using the I2C protocol. It renders the playing field, active and next pieces, player score, and other visual elements in real time according to the game state.

  • Sound Feedback (Buzzer - PWM):
    Provides audio feedback using PWM-generated tones for key game events such as piece rotation, line clearance, and game over notifications.

  • Hardware Design

    Aici puneţi tot ce ţine de hardware design:

    Component List

  • Arduino Uno
  • OLED Display 128x64 (I2C)
  • 4x Push Buttons
  • Breadboard
  • Buzzer
  • Pull-down Resistors (≈10kΩ)
  • Bill of Materials

    Interfețe utilizate:

    I2C – pentru comunicarea cu ecranul OLED (pinii A4 și A5)

    PWM (modulare a lățimii impulsului) – pentru redarea de sunete prin buzzer (pinul D6)

    GPIO – pentru citirea butoanelor (pinii D7, D8, D9, D10)

    Schema electrica

    Circuit electric

    Software Design

    Descrierea codului aplicaţiei (firmware):

    • mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR)
    • librării şi surse 3rd-party (e.g. Procyon AVRlib)
    • algoritmi şi structuri pe care plănuiţi să le implementaţi
    • (etapa 3) surse şi funcţii implementate

    Rezultate Obţinute

    Care au fost rezultatele obţinute în urma realizării proiectului vostru.

    Concluzii

    Download

    O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului: surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-).

    Fişierele se încarcă pe wiki folosind facilitatea Add Images or other files. Namespace-ul în care se încarcă fişierele este de tipul :pm:prj20??:c? sau :pm:prj20??:c?:nume_student (dacă este cazul). Exemplu: Dumitru Alin, 331CC → :pm:prj2009:cc:dumitru_alin.

    Jurnal

    Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului.

    Bibliografie/Resurse

    Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe Resurse Software şi Resurse Hardware.

    Export to PDF

    pm/prj2025/avaduva/alex.dobritan.1747745940.txt.gz · Last modified: 2025/05/20 15:59 by alex.dobritan
    CC Attribution-Share Alike 3.0 Unported
    www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0