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 ...

Get Arduino Projects For Dummies now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.