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
100 watt resistors
10 k watt resistors
Pishbutices
IMPLEMENTATION
Build a circuit that contains 5 LEDs and 5 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. 1.
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 3 lights up.
ii. Player press pushbutton 3
iil. LED 3 and 2 lights up in sequence
iv. Player press pushbutton 3 and then 2.
v. LED 3,2 and 5 Lights up is sequence
vi. Player press peshbumon 3, then 2 and then 5.
The game will end when the user press the wrong sequence.
Please give me the code and explain it MEMORY

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!