This is an old revision of the document!


Two-Player Reaction Time Game

Introduction

A two-player reaction time game inspired by the Romanian TV show “Am întrebat 100 de Români”. Three red LEDs light up one by one, then turn off simultaneously after a random delay — this is the start signal. The first player to press their button wins: their blue LED lights up and an OLED display shows the winner and their reaction time in milliseconds. The goal of the project is to create a simple yet engaging interactive game that tests the reflexes of two players. The idea started from TV shows where contestants must react as fast as possible to a visual signal. The project is useful as a practical demonstration of hardware interrupts, timers and I2C communication on an AVR microcontroller, while also being an accessible example of an interactive embedded system.

General Description

The project is structured around the ATmega328p XMINI microcontroller, which coordinates all hardware and software modules.

Hardware modules:

  • 3× Red LEDs — connected to digital output pins, light up sequentially during the countdown phase, then turn off simultaneously as the start signal
  • 2× Player buttons — connected to external interrupt pins INT0 (PD2) and INT1 (PD3), each assigned to one player
  • 2× Blue LEDs — connected to output pins, one lights up to indicate the winning player
  • OLED display SSD1306 — communicates with the microcontroller via the I2C protocol (SDA/SCL), displays the winner and reaction time in milliseconds

Software modules:

  • Interrupts (Lab 2) — button presses are handled via hardware interrupts, ensuring the fastest possible response time detection
  • Timers (Lab 3) — Timer1 measures the reaction time in milliseconds; Timer0 generates the random delay between the countdown and the GO signal
  • I2C communication (Lab 6) — the TWI hardware module sends data to the OLED display to render text

Hardware Design

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

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/prj2026/florin.stancu/dinu.merceanu.1778175791.txt.gz · Last modified: 2026/05/07 20:43 by dinu.merceanu
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