MEMORY GAME

by Meet b in Circuits > Arduino

91 Views, 1 Favorites, 0 Comments

MEMORY GAME

Memory game  (1).png

This game is going to test your memory. This version of the memory game has 3 LEDs that light up in a random sequence, which you have to remember by pressing the push-button for the specific led. If you get the answer right the piezoelectric buzzer will make a sound. There is a point system which means if you get 9 points then you have won the game, but if you got lower than 9 then you have to try to get 9 in order for the buzzer to make a noise.

GET YOUR PARTS REQUIRED

Screenshot (166).png

The parts required are:

  • Arduino Uno
  • Bread Board
  • 3 LEDs ( Blue, Red, Yellow)
  • Piezo buzzer
  • 7 Segment Display
  • 3 push Buttons (one for each LED Blue, Red, Yellow)
  • 3 10k resistors (used for the buttons)3 330 ohm resistors (used for the LEDs)
  • 2 560 ohm resistors (used for the 7 Segment Display)
  • 1k ohms resistors (piezo buzzer)

WIRING THE BREAD BOARD

Memory game  (1).png
Copy of Memory game  (1).png

Look at the picture above to see how to wire a memory game

Since the Arduino UNO didn't have enough pins, I used the pin A0-A3 for my extra leds and and push buttons that I didn't have a pin.

To wire the 7 segment display, you need to pin all the letters to control the number for the 7 segment display.

To wire the piezo you will use the wire you used for the pin and connect it to positive, then use a 1k ohms resistor and connect it to the positive. Also connect the negative to the minus section at the bottom

UPLOAD YOUR CODE

Memory game  (1).png

This game has 3 leds, piezo buzzer, 7 segment display and push buttons. To make this game work you have to generate a code using c++ language in tinkercad code section. To start the game you have to press start simulation, then the led will play a random sequence. After the sequence of leds lighting up, you have to remember the sequence and press the push buttons for each led that lights up in that exact sequence.

The 7 segment display shows your score. The score you have to get is 9. If you get everything right, which means if you get a score of 9, then the buzzer will make a song. But if you get a wrong answer the score will not change and you have another chance to get the answer right.