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.

You can use a rubber band to strap the Arduino to the breadboard, and then hot-glue the breadboard onto the back of the lamp, as shown in Figure 6-1. Leave some room so that you can insert the LED and glue it in place.

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). You can save a bit of time by noting that you will need only one connection to ground, whether you’re using the RGB LED or three separate LEDs.

Now 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 5 cm (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. Invite your friends over and amaze them!

As an exercise, try to add code that will turn on the lamp when the room gets dark. Other possible enhancements are as follows:

  • Add tilt sensors to turn the lamp on or off by rotating it in different directions.
  • Add a 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.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *