Presentation is loading. Please wait.

Presentation is loading. Please wait.

Danielle Roy.  The goal of this project is to create an emulation of a popular children’s game. This game flashes a pattern at the player, and the player.

Similar presentations


Presentation on theme: "Danielle Roy.  The goal of this project is to create an emulation of a popular children’s game. This game flashes a pattern at the player, and the player."— Presentation transcript:

1 Danielle Roy

2  The goal of this project is to create an emulation of a popular children’s game. This game flashes a pattern at the player, and the player must recreate the pattern given a set of buttons.

3  The game consists of ten levels  Each level has a pattern length equal to the level number  The same pattern is used each level with one more light added to the sequence at each level up  The player must memorize the pattern and recreate it using the buttons  To win, a player must beat all ten levels  A player loses when an incorrect button is pressed

4  There are 5 files in the final project ◦ Initialize.c ◦ main.c ◦ ISR.c ◦ Process_Lights.c ◦ Talkthrough.h  The final project used some initialization code from the Talkthrough folder used in Labs 3-5

5  Initialize.c included two header files: Talkthrough.h and math.h ◦ Talkthrough.h included all the functions and variables used in the project ◦ math.h was included so that the rand() function could be called  Initialize.c initialized critical sections of the BF533 so that the LEDs and buttons would work  Initialize.c also included most of the defined functions for the program

6  main.c is the part of the code where the initialization functions are actually run  It is kept running infinitely until halted in order to ensure continuous play

7  The ISR.c file handles all the interrupts for the system.  Handles the specific instructions for pressed buttons  Begins the actual game  Calls the Process_Lights() function at the end to continue (or end) the game

8  Contains most of the actual game code  Defines the Process_Lights() function, which displays the pattern and waits for user input  Has a light pattern for game won  Has a light pattern for game lost  Resets game after end

9  Contains prototypes of all functions in the project  Contains external declarations of all variables  Defines Ports

10  Project was built successfully  Areas for improvement/expansion: ◦ Add tones to play with the lit LEDs ◦ Investigate a better seed for the rand() function  Currently using iChannel0LeftIn  Works but is predictably random


Download ppt "Danielle Roy.  The goal of this project is to create an emulation of a popular children’s game. This game flashes a pattern at the player, and the player."

Similar presentations


Ads by Google