Simon Says Game Made Using Evive (Arduino Powered Embedded Product)

Introduction: Simon Says Game Made Using Evive (Arduino Powered Embedded Product)

About: STEMpedia is a place bringing project-making tools at one place- kits, online courses, coding platforms, controller app and tons of free learning resources.

How fun it will be first to make a DIY game and then play it woth your friends! So here we will make a game. Its called Simon Says. We have made this game using evive. The codes are developed in very simple fashion in Arduino IDE. The objective of the game is simple: there are five LEDs/bulbs and five corresponding switches. The bulbs light up in a random order generated everytime. You then have to press the buttons in the exact same order. If the sequence is correct, a 'correct' sequence of lights starts and you will progress to the next level. The current level number will be displayed on the TFT screen of evive. Otherwise, an 'incorrect' sequence lights up. A "Game Over" is displayed on the screen.

Step 1: Components Used

Components required:

  • evive
  • (Optional) TFT screen (evive has inbuit TFT screen :P )
  • Breadboard
  • male- male jumper cables
  • Breadboard wires
  • 5 LEDs
  • 5 Push (Tactile) Buttons
  • 5 Resistors 220 ohms each
  • 5 Resistors 1 kilo-ohm each

Step 2: Making the Connections

First, we make the first bulb- pushbutton set.

  • Place a pushbutton on the breadboard.
  • Now, above the right side of the button, insert the positive terminal of the led (the longer one) and the negative terminal into the hole right to it. Now, ground the negative terminal through a 220 ohm resistor.
  • Make the left side of the pushbutton positive.
  • Now, connect the other side of the pushbutton to a digital pin of the evive (pin2).
  • Also, ground this through a 1 kilo ohm resistor (pulling down the switch)

Now we just have to repeat the above process 4 more times. Connect these to pins 3,4,5 and 6. For more info you can see the circuit diagram.

Notice that at this point, any pushbutton you press will light up the corresponding bulb. Take care not to inter- connect two different bulb- pushbutton sets.

evive has inbuit 1.8" TFT screen with SPI interface. You can check the internal wiring diagram here.

Step 3: Coding the Game

We are using same pins i.e. 2, 3, 4, 5 and 6 as both input and output.

Initially, we declare all the pins connected to bulbs as OUTPUT. This will enable them to glow (for the showing of the sequence). After the showing of the sequence, the pins are declared as INPUT (for getting input from the pushbutton response)

The basic motive is to determine which button is being pressed. Since only one pushbutton will be pressed at a given time, it is fine to check if any of the input pins is HIGH in an 'or' statement. Then we can check which of the buttons was pressed individually.

The target sequence (shown initially) is generated by using the pseudo-random number generator of the Arduino IDE. After the input response is registered, it will be compared with the target sequence.

You can view and download the code at our git repository.

Step 4: Displaying Text on the Tft

evive uses ST7735 SPI 1.8" colored TFT screen and the library for this screen is available on adafruit. This is a hardware level library. You can download the library from github

Some examples are also included in the github repository above.

To display text, we basically need these three functions-

  • setTextColor(textcolor, textbackgroundcolor)
  • setCursor(x-coordinate, y-coordinate)
  • setTextSize(size)

The screen is cleared by setBackgroundColor(backgroundcolor).

Step 5: Setting Different Levels

We have set some levels also, actually it has 10 levels. As you approach the next level the time delay for which the LED is on is reduced. In level 1 it is about 500 milliseconds, after level it get reduced by 50 milliseconds.

Step 6: Finally, Play the Game Made by YOU With Evive Using Arduino IDE

Now it is ready to play. Show it to your friends and enjoy playing with them. And lets watch who reaches to maximum level.

You can check out more about evive here. Its a ONE-STOP solution for all your DIY projects.

Visit our YouTube channel for more projects.

Makerspace Contest

Participated in the
Makerspace Contest

Be the First to Share


    • Audio Challenge 2020

      Audio Challenge 2020
    • Maps Challenge

      Maps Challenge
    • Backyard Contest

      Backyard Contest



    4 years ago

    In the dawn of a human realyizing the "micro-electronics, some times before You was born", there was just the same "idea" of what a human could do with this "Amaizing" tech. Hang on. Yu'll be inlighted.So did allso Edison .. Marconi.. etc. company