Christmas Music Escape Room Arduino Puzzle

Introduction: Christmas Music Escape Room Arduino Puzzle

About: Makeademic

For this holiday escape room puzzle, you will have the player flip a switch to listen to a song and research to find the answer to the question: "Which two celebrity artists collaborate on this holiday mashup song in the film Pitch Perfect 2?" You will need the following things to get started:

Supplies

  • 1- Arduino Uno
  • 1- USB cable
  • 1- mini breadboard
  • 1- slideswitch
  • 1- piezo
  • 1- RGB LED
  • 4- 1k ohm resistors
  • 9- jumper cables

Step 1: Arduino Code

For this project, you will use the attached code, which checks for a switch and plays music on the piezo and lights up the RGB LED in a repeating sequence of flashing red, white, and green. The code is fully commented.

To create the melody and tone duration arrays in the code, you have to convert the values on the sheet music, reading both the placement on the staffs as notes on a scale from C2 to C6 and reading the shape of the notes from whole notes to 16th notes, and then using commas to separate the values. (NOTE: Rests are given a melody value of 0).

Step 2: Hardware Setup

  1. Connect a slideswitch to J1-3 on the breadboard (Terminal 1>J1, Common>J2, Terminal 2>J3).
  2. Use a wire to connect G1 on breadboard to GND on Arduino to ground Terminal 1.
  3. Use a wire to connect I2 on breadboard to digital pin 2 on Arduino to digitalRead the common slideswitch terminal.
  4. Connect a 1k ohm resistor from F3 to D3 on the breadboard and use a wire to connect from A3 on the breadboard to 5V on the Arduino to provide power to the switch.
  5. Connect a piezo to J6 and J11 on the breadboard (positive to J6, negative to J11).
  6. Use a wire to connect F6 on the breadboard to digital pin 3 on the Arduino to send a tone function.
  7. Use a wire to connect F11 on the breadboard to GND on the Arduino to ground the piezo.
  8. Connect a common cathode RGB LED to J14-17 on the breadboard (Red>J14, Cathode>J15, Blue>J16, Green>J17).
  9. Connect a 1k ohm resistor from F14 to D14 on the breadboard and use a wire to connect from A14 on the breadboard to digital pin 11 on the Arduino to provide signal to the Red lead of the RGB LED.
  10. Use a wire to connect F15 on the breadboard to GND on the Arduino to ground the RGB LED.
  11. Connect a 1k ohm resistor from F16 to D16 on the breadboard and use a wire to connect from A16 on the breadboard to digital pin 9 on the Arduino to provide signal to the Blue lead of the RGB LED.
  12. Connect a 1k ohm resistor from F17 to D17 on the breadboard and use a wire to connect from A17 on the breadboard to digital pin 10 on the Arduino to provide signal to the Green lead of the RGB LED.

Step 3: How to Play

In order for the player to play the puzzle, they will need to click the switch to hear the clue.

"Which two celebrity artists collaborate on this holiday mashup song in the film Pitch Perfect 2?"

Use the Tinkercad Circuits simulation below to test it out!

Link to Remix This Tinkercad Circuits Project: https://www.tinkercad.com/things/5eEoproeFVG

Be the First to Share

    Recommendations

    • Photography Challenge

      Photography Challenge
    • Jewelry Challenge

      Jewelry Challenge
    • Raspberry Pi Contest

      Raspberry Pi Contest

    Comments