Cover by Adam Wolf, Matthew Beckler, John Baichtal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

Chapter 9. Project: Lamp

IN THIS CHAPTER

Parts List

Assembly Instructions

Program the Lamp

The Next Chapter

The Lamp project creates a Lego light that can be controlled via smartphone
Figure 9-1. The Lamp project creates a Lego light that can be controlled via smartphone

For our final project we’re going to create a lamp out of Legos that uses translucent bricks as the shade. We chose a classic kid’s night light for the bulb, in part because it’s very compact—all the better to fit in the modest confines of the Lamp project’s interior—as well as because of its low heat output.

You might express alarm at the prospect of triggering wall current with your Arduino. Is it safe? As long as you’re careful! We use a hobbyist power cord (see the sidebar, POWERSWITCH TAILS) that connects the night light to AC current in a way that’s as safe and effective as flicking a light switch. It’s a great tool that will encourage you to do more high voltage projects without your Arduino without getting fried.

For fun, we’ll add a Bluetooth Shield, so we can control the lamp remotely. We’ve written an Android app that works with most Android phones and tablets. It’s available on the Google Play store, as well as on the Bricktronics website. There have been some reports that the Bluetooth Shield we use in this project doesn’t work with a few Android phones—check the Bricktronics page for compatibility information. Once you have it installed, turn Bluetooth on in your Android device’s settings, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required