Main Content

Secret Maze 2

This simple project, based on an ATtiny85, gives you a maze that you have to solve by navigating it with four push buttons. The available paths in each direction are shown by four LEDs: a lit LED means that your way is blocked by a wall, and the speaker beeps if you try to move in that direction.

When you get to the goal all four LEDs flash, and a tune confirms you’ve succeeded! You can select one of six different mazes to solve.

The project is a good example of what you can achieve with the diminuitive ATtiny85; as well as mapping the maze it’s driving four LEDs, reading four push buttons, and playing tones through a speaker!

This is an improved version of my earlier projects Secret Maze and Secret Maze PCB.

I recently wanted to build one of my Secret Maze PCBs as a present for a friend’s son, and decided to make a few improvements at the same time:

- I redesigned the PCB to make the buttons and LEDs aligned vertically and horizontally, rather than slanted as on the original PCB, as this is more intuitive.
- I have included six different mazes, and allowed you to select one at the start of a new game. You can also add your own mazes.
- I have also made it easier to design your own mazes, and incorporate them in the program, using a popular web-based pixel editor.

This new version of the project includes six alternative mazes. When you start the game the four lights flash in different patterns; press the Down button labelled On when the pattern of lights shows the maze you want. The maze corresponding to the Up light is the same as the one in the original Secret Maze; the other five mazes are new.

To avoid the need for an on/off switch the circuit automatically goes to sleep if there has been no keypress for 30 seconds; this has the advantage that it’s not possible to inadvertently leave the game on, and run down the battery. To wake up the game press the Down button labelled On on the PCB.

To go back to the maze selection mode at any time, press and hold all four buttons, then release them.

Navigating the maze using the four lights is challenging, and unless you’ve got a very good visual memory you’ll probably need to draw a map on a piece of paper as you traverse it.”

Link to article