Memory Game

Overview

This is an implementation of Simon, a game where four lights blink in a sequence which has to be remembered and re-entered.

Images

Details

To challenge myself I wanted to use an ATtiny45 microcontroller, which has only eight pins. I came up with the idea to use the same pin for the button and LED of each of the four colors. A transistor enables or disables the LEDs. This only leaves the reset pin of the ATtiny, which is used for starting a new game.

The game has five different modes, which can be selected by pressing one of the buttons shortly after starting a new game. In the default mode, a new color gets added to the sequence after each round. The second mode generates a whole new sequence each time. These two modes both have a reverse mode, where the sequence has to be entered in the opposite order as displayed. In the final mode, two players take turn to enter the sequence and then add a color of their choice.

Downloads

Schematic
Source code