Introduction: Arduino Piezo Keyboard Escape Room

The goal of this escape room is to make it out of Daedalus' Labyrinth, the impossible maze from Greek Mythology. It is home to the Minotaur, and as you're trying to make your escape you unfortunately cross paths with the terrible beast. In order to escape your demise, you're told there is a special flute tune that can put the Minotaur to sleep so you can make your escape. This Arduino features 4 push buttons connected to a Piezo. Answer the question in the serial monitor, receive the tune, and escape the Minotaur.

Supplies

1. Arduino Uno

2. USB Cable

3. Breadboard

4. Piezo

5. 4 Push buttons

6. 1 100 Ω Resistor

7. 4 10 kΩ Resistors

8. 13 jumper wires

Step 1: Setting Up the Code

For this escape room you will need to use the included code in Arduino .

The code prompts a question to appear in the Serial Monitor for you to answer. If answered correctly, the Serial monitor will then provide you the tune needed to solve the puzzle. If answered incorrectly, the serial monitor will tell you so and prompt you to try again.

Then, the code tells the Arduino when a push button is pressed, to trigger the piezo to play a sound. Each button is to play a different tone when pressed.

Step 2: Setting Up the Hardware

For this setup, you will connect a red jumper wire from Arduino 5V to the positive side of the breadboard and a black wire from ground to the negative side. To ensure that the connectivity runs through the whole breadboard, take another red wire to connect the power rails on the positive sides of the breadboard, and then another black wire to connect the two negative sides.

Place the piezo into E1 and H1 on the breadboard, then connect a wire from digital pin 8 to D1 on the breadboard, as demonstrated by the purple wire in the image. This connects the piezo to the circuit.

connect the 100Ω Resistor (the one with the brown-black-brown bands) to J1 and the negative side of the breadboard. This resistor is connected to the Piezo.

Place the four push buttons with the top left corners in the following nodes on the breadboard: F13, F17, F21, and F25. The buttons should now be placed over the valley of the breadboard, connected to the two sides as pictured.

To connect these buttons to the Arduino, place a wire running from analog input 0 to D13 (the orange wire), then from input 1 to C17 (yellow wire), then input 2 to B21 (green wire), and finally from input 3 to A25 (blue wire).

The last step is to place the 10 kΩ resistors (the ones with the brown-black-yellow bands) and final wires. each resistor should have one end in the negative side of the power rail. the other ends go in the following nodes: J13, J17, J21, J25. Then, connect wires alongside the resistors from the positive side of the power rail to the following nodes: J15, J19, J23, and J27 (these are pictured as the small red wires)

Now you should have successfully connected your pushbuttons and piezo to the Arduino in the Digital 8 pin and Analog Input pics 0-3.

Step 3: Playing the Escape Room

For this puzzle you will start this simulation and look to the serial monitor to answer a question. Answer the question correctly and you will receive the correct tune. Press the push buttons in this order to put the Minotaur to sleep.