Skip to content

Reaction time testing game using an ARM Cortex M microcontroller, programmed using Embedded C.

Notifications You must be signed in to change notification settings

prernamittal/ReactionTimeTester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reaction Time Tester

Objective: The objective of this mini-project is to develop a reaction time testing game using an ARM Cortex M microcontroller. The game measures the player's reaction time by measuring the time it takes to press a button after an LED turns on.

Brief Description: The gameplay involves an LED turning on for a random amount of time between 1 and 5 seconds. Once the LED turns off, the player must press the button as quickly as possible. The microcontroller measures the time between when the LED turns off and when the button is pressed, and the player's reaction time is displayed on an LCD display. The hardware required for this project includes an LED, an LCD display, a button/switch, jumper wires, and an ARM Cortex M microcontroller (NXP LPC1768). This mini-project aims to provide an entertaining way to test the player's reaction time while also demonstrating the use of microcontrollers in gaming applications.

Hardware Required:

  • An LED
  • LCD display
  • A button/switch
  • Jumper wires
  • ARM Cortex M microcontroller (NXP LPC1768)

    Gameplay:
  • The LED turns on for a random amount of time between 1 and 5 seconds.
  • When the LED turns off, the player must press the button as quickly as possible.
  • The microcontroller measures the time between when the LED turns off and when the button is pressed.
  • The player's reaction time is displayed on an LCD display.

    How to run the program

    1. Open Keil µVision4 and create a new project: Click on Project → New µVision Project. Select the directory where you want to save your project and give it a name.
    2. Configure the project: Click on Project → Options for Target. Select the Device tab and choose the device that you are using (in this case, NXP LPC1768). Configure other settings in the Configuration WIzard of system_LPC17xx.h
    3. Add the source files to the project: Right-click on the Source Group folder in the Project window and select Add Existing Files to Group. Browse to the directory where your source code is saved and select the main.c file. Click Add.
    4. Build the project: Click on Project → Build Target. If there are no errors in the code, the project will build successfully and you will see a message saying "Build target 'Target 1' completed."
    5. Configure FlashMagic: Open FlashMagic and select the correct serial port and baud rate for your microcontroller board. In the Options menu, make sure that the correct device (NXP LPC1768) is selected.
    6. Connect the board to the computer: Connect your microcontroller board to the computer using a USB cable.
    7. Load the program: In FlashMagic, select the HEX file that was generated by Keil µVision4. Click on the Start button to begin downloading the program to the board.

    Keil µVision4 Window

    Note: Required files to be included like lpc17xx.h, system_LPC17xx.c and startup_LPC17xx.s have been included in the repository for easy access.
  • About

    Reaction time testing game using an ARM Cortex M microcontroller, programmed using Embedded C.

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published