Here's How to Assemble It:
Unpack the lamp and remove the cable that goes into the lamp from the bottom. You will no longer be plugging this into the wall.
Strap the Arduino on a breadboard and hot-glue the breadboard onto the back of the lamp.
Solder longer wires to the RGB LED and glue it where the lightbulb used to be. Connect the wires coming from the LED to the breadboard (where it was connected before you removed it). Remember that you will only need one connection to ground if you are using a 4-lead RGB LED.
Either find a nice piece of wood with a hole that can be used as a stand for the sphere or just cut the top of the cardboard box that came with the lamp at approximately 5cm (or 2") and make a hole with a diameter that cradles the lamp. Reinforce the inside of the cardboard box by using hot glue all along the inside edges, which will make the base more stable.
Place the sphere on the stand and bring the USB cable out of the top and connect it to the computer.
Fire off your Processing code, press the on/off button, and watch the lamp come to life.
As an exercise, try to add code that will turn on the lamp when the room gets dark. Other possible enhancements are:
Add tilt sensors to turn the lamp on or off by rotating it in different directions.
Add a small PIR sensor to detect when somebody is around and turn it off when nobody is there to watch.
Create different modes so that you can get manual control of the colour or make it fade through many colours.
Think of different things, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access