Swipe to navigate through the chapters of this book
The projects that you’ve encountered thus far have used GPIO pins to turn LEDs on or off. But what if you wanted to control the brightness of an LED? Given that you can only turn pins on (high: 3.3V) or off (low: 0V), you have no way to send less power to the LED; the lower the power, the dimmer the LED. If you consider solutions (or features) of devices that are sensitive to ambient light—such as a backlit keyboard—you may have noticed it changes brightness as the room becomes darker. In this project, you’re going to explore how such a feature works. That is, you’re going to build a fancy LED nightlight.
Please log in to get access to this content
To get access to this content you need the following product:
Creative Commons Attribution-Share Alike 3.0 Unported License.
There are other ways to do this, but this uses a technique you’ve seen previously.
This pattern of ever-increasing complexity continues in the next chapters—so strap in and hang on!
- Project 2: Measuring Light
- Sequence number
- Chapter number
- Chapter 11
Neuer Inhalt/© ITandMEDIA