Materials (all included in our Mood Lamp Starter Kit for Arduino:
1 x Arduino and USB Cable
4 x M-M Jumper Wires
4 x 330 Ohm Resistors
1 x RGB LED
1 x Small Breadboard
1 x Small Glass Globe
1 x White Candle
- First things first: let’s frost the glass globe for your mood lamp. Start by removing the white wax from the metal tea light holder, and pull the wick out. Put it in a microwave safe dish and melt it for about 2 minutes or until fully liquid, OR melt it on the stove in a small pot. IMPORTANT NOTE: Wax burns can be very painful! Please ask for an adult’s help with the wax in this project. To clean wax out of your melting container, let it harden, and then scrape off any chunks. Use a sponge scrubber or steel wool to remove any wax residue.
- Take the globe and pour the melted wax inside of it. Holding the globe with a kitchen towel or oven mitts, swirl the wax around to get a good coating over the inside. If it’s not perfect, that’s OK! The swirly and drippy designs on the globe are what creates an interesting pattern for your mood lamp.
- Set your globe to the side to let it cool down.
- Now it’s time to wire up your breadboard with your RGB LED. For this part, you’ll need your breadboard, 4 resistors, jumper cables, and your LED. There is a diagram included in your kit if you would like a visual to follow along.
- Look at your RGB LED closely. There will be one leg that is slightly longer than the others—this is your negative prong. The longest, negative prong will go in the back negative (-) column on the breadboard.
- The other three are the red, green, and blue prongs. These can go into any hole they can reach, as long as no two prongs are in the same ROW (1-30).
- Insert one end of the 330 Ohm resistor next to each LED prong (except for the negative prong) in the same row. Insert the second leg of each resistor into another row that does not yet have a prong in it.
- In the same row as the SECOND leg of each resistor, insert one leg of each jumper wire. Insert one jumper wire into the negative (-) column on the breadboard for your negative wire.
- Attach the jumper wires to the Arduino: on the “digital” side of your board, insert the wire from the negative column into the ground (GND) input, and the other three wires into pins 10, 11, and 12 in any order.
- You’re now ready for software! Read your instructions manual for information on installing Arduino programming software on your computer. It can be downloaded from Arduino here: https://www.arduino.cc/en/Main/Software.
- When you’re ready for the code, use the Mood Lamp program written by Andre Infante available on PasteBin: pastebin.com/4U3xEGmb. It includes very useful notes that will help you understand what the code does and how it is structured. Paste the code into a sketch in the Arduino program and upload.
- Once you’ve uploaded the code, you can test your colorful mood lamp! Use the 9V battery adapter that came with your kit or a wall adapter to power your project.