Arduino LED Memory Game in a Simple Way
by CrazyScience in Circuits > Arduino
1597 Views, 8 Favorites, 0 Comments
Arduino LED Memory Game in a Simple Way
Hey guys in this instructables i made this amazing memory game project using arduino and the best part is you can build this too following my step.
To begin with let me quickly explain how this project works, This is a memory game that uses LED
each time the led blinks in an random order and you have to press the button according to that blinked order and if you get it right you can head over to next level
it follows this pattern at first only one led blinks if you press it right next 2 LED glows and if you get it right 3 and so on, if you get anything wrong the game stops and starts from the beginning.
This is an excellent party game and you can also improve your memory skills with this game, I have given all the details to build this project so give a try.
We will start by collecting some materials and then proceed further, there is also a working video of this project given in the end make sure to check that.
Supplies
Below are the components used to make this memory game, Keep all these handy so that you can build it without any delay
Arduino Uno complete Kit from Amazon
LCD with i2c
LED(color of your choice)
Breadboard
Tactile push button
Piezoelectric Buzzer
Jumper wires
Cable(single stranded)
Piece of cardboard
Hot glue
Double-sided adhesive tape(optional)
Connect Led and Buttons
Instead of making a very messy wiring setup i simply used breadboard, This breadboard not only helps to make the connections easily but also serves the purpose of a console in our game!
Let me make the circuit simple easy for you, Here we have LED and the buttons.
The ground of all the LED and button will be connected to the negative power rail of the breadboard and this will be connected directly to the gnd pin of the UNO board.
Here there is one catch, the LED and buttons are arranged from right to left.
Right button and LED are number from 1 to 4, so you need to follow this order when making the connections.
Toggle buttons are connected from D2 to D5 and the LED pins are connected from D8 to D11.
SDA to A4 and SCL to A5 from LCD is connect to Uno followed by the Gnd and 5v pin directly to the uno.
I have used the same system to make the connections and you can see that in this step.
Codes and Setup
For the program you can refer to the files below, I know you are seeing 3 files create a folder and paste all these 3 files together and later open Arduino IDE
Connect the USB cable to the computer and arduino and open this code, select the proper port number and the port type and click on upload button.
This might need LCD library if you have not used it before you can get it from arduino.cc
Upload the code and we can head over to next steps
You also can simplify this circuit with a Simple small PCB, Complete your electronic projects in the best way from PCBWay
They are raining great offers since their 10th anniversary is live enter now
Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market, They also have Color PCB printing Try it out.
Don't have a 3d printer? You can get the best 3d printing service here
Check Here for Rigid-flex Pcbs with this your circuit becomes flexible! I have added the images to this step kindly check.
A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.
With their expertise in advanced manufacturing techniques, they offer a seamless integration of rigid and flexible components, ensuring enhanced reliability, durability, and space-saving benefits.
How to Play
Playing is easy like plug and play device! all you have to do is connect the board to USB power source using USB cable.
LCD will show a message to press the first button pres the button from the last left side and now the game will begin.
At first the single LED will glow and now you have to press the button below that LED if you got it right the game will move to next level that is level 2.
In level 2 instead of one LED the 2 led will glow in random order and now you have to press the right button to move to next level.
If you are not able to get this right the game will start from the beginning, i think up to level 4 anyone can play later the real game begins from level 5 where you have to guess the correct order, set this game at your house parties and have fun.
Hope this project will be useful to you in someway, Thank you for reading and have a great build.
Working Video
Don't miss to see the gameplay of this project, There are plenty of ways to make this more and more interesting by adding various other modules for example the sounds.
This is all about this project, Thank you for making till here.