Memory


Here I am again, this time with a Memory-like game. A series of led lights randomly, and the player has to reproduce the exact sequence; then, it will proceed to the next level. It’s a simply idea: let’s go to practice.

Memory - componentsThis time we need:

  • three led;
  • a RGB led (a led that can change its color);
  • three buttons;
  • six 220 ohm resistances and three 10k ohm resistances.

The circuit is full of wires, but don’t worry: you just have to link every component to the ground and to the digital pins of Arduino. Here’s the scheme:

Memory_schem

Now, the software. We need a sketch that will generate a random sequence, light the leds, and receive input from the player though the buttons. If the sequence is right, the RGB led lights in green, and it will go to the next level. Otherwise, the RGB led lights in red, and the same sequence is reproduced.

This is my implementation.

The finished circuit should look like this:

Memory final

Enjoy yourself. Stay tuned!

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...