Question: Please give me the code and explain it MEMORY GAME objectives After performing this lab, the students should be able to: Write a C program
Please give me the code and explain it
MEMORY GAME
objectives
After performing this lab, the students should be able to:
Write a C program to simulate a memory game using an Arduino Uno board.
COMPONENTS EQUIPMENTS
Arduino UNO
Yellow LEDs
Red LED
Green LED
watt resistors
k watt resistors
Pishbutices
IMPLEMENTATION
Build a circuit that contains LEDs and probes that are connected to the
Arduino Uno board output and input ports, respectively.
Add a green LED to indicate each time the correct pushbutton was pressed and a red
LED to indicate game over, as shown in Fig.
Write a C program that would continuously output a random sequence of LED
patterns each iteration and have the player repeat the same pattern. Each iteration will
increase the number of LEDs that light up by one. An example of how the game
works is explained below:
L LED lights up
ii Player press pushbutton
iil. LED and lights up in sequence
iv Player press pushbutton and then
v LED and Lights up is sequence
vi Player press peshbumon then and then
The game will end when the user press the wrong sequence.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
