O'Reilly logo

Arduino Projects For Dummies by Brock Craft

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

Chapter 5

Making a Light Pet

In This Chapter

arrow Gathering parts

arrow Building the circuit for your light pet

arrow Understanding how the code works

arrow Fading LEDs with pulse-width modulation (PWM)

Light can certainly be warm and emotional. As light changes or shifts, you may find that it takes on a personality all its own. Perhaps you never thought of light as a pet, but by using a little creativity, and the information in this chapter, you can create one. You can build a critter with colors and moods. The light pet cycles through a random series of colors by mixing red, green, and blue light from LEDs. You can make just about any color by varying the combinations of the brightness of these three LEDs.

In this chapter, I detail how to get together the necessary parts. I explain how to wire up the parts, build the circuit, and check that you have connected everything properly. After you upload the code to the Arduino, you can tweak it to give your pet a fun personality. The final step is putting it all into an appealing enclosure.

My version of this project is a pet I’ve named Lux. I chose this ...

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