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 way of example, you could combine the circuit ideas and examples from Chapter 7, Turning Things On and Off, to switch on a pump...