Summary
In this chapter, we learned how to read sensor values using the ADC interface. We also learned how the ADC interface translates voltage to digital values, and then we utilized this knowledge to write the soil moisture sensor
library.
We then wrote the water level sensor
library by utilizing the knowledge we gathered in the first project of this chapter. Then we learned how to use a buzzer and wrote a very simple library that enables us to let a buzzer create warning sounds. After that, we learned how relays work and utilized this knowledge to control a pump using a library we wrote. At the end of this chapter, we put all the libraries in a single project and only had to add a small amount of control logic to build the automatic plant watering system.
In the next chapter, we are going to learn how to use supersonic sensors and how to control seven-segment displays.