Simon Says – Code

This snippet was some of the most driving code within the Simon Says system. The randomized pattern generation to illuminate the LED’s was critical to operational success. Patterns could have been hard coded, but at the cost of efficiency and code readability.

Following the randomized pattern generation, this display function illustrates the initial step in reading user input. This “lock and key” mechanism (LED display and user input) ensures the advancement of progress throughout the game.

Simon Says

The goal of this project was to create a functioning version of the electronic game, Simon Says. This was achieved as the game operated as expected, producing random patterns of illuminated LED’s and accepting user input. Each round produces a random sequence and awaits user input. If correct, the green LED flashes and the next pattern is displayed. If incorrect, the red LED flashes and the game restarts with a randomly generated sequence.