Measuring Temperature, Humidity, and Light Levels

In the previous chapter, we explored two methods of making color with RGB LEDs – using a common RGB LED and with an addressable APA102 RGB LED strip. We also learned how to use a simple OLED display and how PWM can be used to play music using a passive buzzer.

In this chapter, we will be looking at some common components and circuits for collecting environmental data, including temperature, humidity, whether it's dark or light, and how to detect moisture.

The circuits and code examples we will learn will be useful for building and experimenting with your own environmental monitoring projects. These circuits can be considered input or sensor circuits that measure environmental conditions. By ...

Get Practical Python Programming for IoT 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.