Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS/EE 120B Custom Laboratory Project

Time Reaction Game

Video link: https://www.youtube.com/watch?v=gcHPkTS9bLE

Introduction

The Time Reaction Game is a game that checks for how fast the player’s reflexes are. One game consists of 20 LED blinks. From 4 LEDs on the breadboard, one will flash randomly and the player will have to press the corresponding button within time to turn it off to get points. The IR remote will start the game.

The 16x2 LCD Screen will display the points and the players win/lose status with a custom character along with a replay msg. The passive buzzer will play a short music/tone to indicate that the player won/lost. If the player happens to disconnect, there is no need to worry because the points will be saved. However there is a minor bug where the game will restart, but the points are still saved.

Build-upons

  1. Successfully implemented custom characters on the 16x2 LCD when players win or lose.

  2. Successfully implemented the passive buzzer to play short tone/music when the player wins of loses

  3. Successfully implemented the IR Remote to start the game

  4. Successfully implemented EEPROM to save the current point, when the game is disconnected and connected again, the point the game had before disconnecting is saved into memory.

User Guide

To start the game the user will need to press the power button on the IR remote. Once the game starts, the LEDs will start blinking. There are 2 buttons, the left button will turn off the 2 left LEDs and the right button will turn off the 2 right LEDs. The user must press the corresponding button within time to get points.

The LCD Screen will display the points. If the user gets at most 10 points, they lose so they’ll a lose message with a sad face 😞 sad with sad song/tone. If they get more than 10 points, they’ll get a win message with a happy face 🙂 with a happy song/tone. A third button will allow the player to replay the game. If the user happens to disconnect, the points will be saved by EEPROM, so once reconnected the LCD screen will output the saved points.

Hardware Components Used

  • Computing

    • UNO R3 Microcontroller(ATmega328)
  • Inputs

    • IR Remote
    • 3 Buttons
  • Outputs

    • 16x2 LCD Screen
    • 4 LEDS
    • Passive buzzer

Software Libraries Used

avr/eeprom.h - This library was used to implement the EEPROM to save game points into memory.

stdlib.h - This library was used to implement the random LED blinks. srand() function was used to get the LED value and rand() function was used to randomize the LED blinks.

stdio.h - This library was used to display the points on the LCD screen.

LCD.h - This library was modified to add a function for custom characters on the LCD screen.

Wiring Diagram

Screenshot 2024-11-13 at 4 14 15 PM Screenshot 2024-11-13 at 4 14 23 PM Screenshot 2024-11-13 at 4 14 20 PM

About

time reaction game project

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages