Simon says

This page describes the puzzles that will make up the final project.

This puzzle is based on the game of Simon Says).

Goal

Follow the increasingly long pattern of lights (and sound).

Gameplay

A code is generated each time the game is powered on.
The first button of the sequence will blink and then wait till that button is pressed. If the button is not pressed for five seconds, it will start over and blink again.
If the button is pressed, the level is raised and the first, then the second button of the sequence will blink.
And so on.

If all buttons are pressed in the correct order, the puzzle is solved.

  graph LR
    BEGIN(INIT) -- receive solution --> A2[READY]
    A2-- receive start -->A3[RUNNING]
    A3-- display sequence -->Q1{Answer}
    Q1-- correct increase level -->Q2{end reached}
      Q2-- yes -->FINISH[FINISH]
      Q2-- no -->A3
    Q1-- wrong level = 1 -->A3

Build

The build is straigt forward. Each button and each LED have a dedicated IO pin of the microcontroller. Multiplexing would reduce this to 6 pins (4 for selection, 1 for button and 1 for LED), but this would make the code much more complicated. The attiny3216 has enough pins available. There is no official color sequence, so the buttons are mounted in a green - red - blue - yellow order.

Bill of Materials

4 x button (square with LED (green, yellow, red, blue))
4 x resistor 330 Ohm (tbd)
1 x PCB
1 x Attiny3216
1 x MAX485
1 x 1206 resistor 0 Ohm 1 x 1206 resistor 330 Ohm
1 x 1206 capacitor i uF 1 x 1206 LED (red)
1 x 01x02 pinheader SMD (for UPDI)
3 x 01x04 pinheader SMD (for serial, buttons and LEDs)
1 x 02x03 pinheader SMD (for RS485)

PCB

PCB
PCB

Files

The PCB can be found here:

The code can be found here: