Are You Rocking Around the Christmas Tree This Year?
by raeannaeudy in Circuits > Arduino
140 Views, 1 Favorites, 0 Comments
Are You Rocking Around the Christmas Tree This Year?
Well you should!!!
For this Holiday Puzzle, you will need to be able to push a pushbutton in order to make the wonderful Christmas song we all know and enjoy!!! The goal is to make sure you have the led lights in the right place so you will have lights and a song all at once. Heres the supplies you will need to get started.
Supplies
1- Arduino Uno
1- USB cable
1- mini breadboard
1- pushbutton
1- piezo
2- RGB LED
3- 1k ohm resistors
8- jumper cables
Step 1: Arduino Code
Using the attached code, which checks for a pushbutton and plays music on the piezo and lights up the RGB LED in a repeating sequence of flashing red, white, and green. You will create a 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.
Step 2: Hardware Setup
How to set it up:
Put In 2 LEDS with whatever color you like!! (k1-2) and the second (k16-17) on the breadboard
Connect a 1k ohm resistor D1-F1
Connect a 1k ohm resistor C5-C8
Connect a 1k ohm resistor D16-F16
Connect a pushbutton to E3- 5 on the breadboard F3-5.
Use a long red wire to connect 5v on breadboard to I3 on Arduino to the breadboard.
Use a black wire to connect GND on Arduino to ground A1.
Use a red cord from F2 to 12 on the Arduino
Use a red cord from D5 to 12 on the Arduino
Use a black cord from A9 to CMD on the Arduino
Use a red cord from A12 to -3 on the Arduino
Use a black cord from B9 to B16 on breadboard
Use a green cord F17 to 2 on the Arduino
Lastly use the piezo to connect the breadboard the black cord to D9 and the red cord E12 (be gentle)
Step 3: How to Play
In order for you to play you'll need to us the pushbutton to make everything connect. Make sure your LEDS are in the right holes so they can light up correctly!!! Hope you enjoy this escape room and HAVE A ROCKING HOLIDAY!!!!!
Link to Remix This Tinkercad Circuits Project: https://www.tinkercad.com/things/14LE55qBqQk