Chapter 4: Measuring the Amount of Light with a Photoresistor
This chapter focuses on how to connect a photoresistor, an electronic component that measures the amount of light from the environment, to an input port of both the Blue Pill and Curiosity Nano microcontroller boards. In this chapter's exercise, we will analyze with a photoresistor whether a plant receives enough light.
In this chapter, we are going to cover the following main topics:
- Understanding sensors
- Introducing photoresistors
- Connecting a photoresistor to a microcontroller board port
- Coding the photoresistor values and setting up ports
- Testing the photoresistor
By the end of this chapter, you will have learned how to connect an analog sensor to a microcontroller board, and ...
Get DIY Microcontroller Projects for Hobbyists now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.