Environment Sensors

In this chapter, we will look at building a really simple weather station using the DHT11 temperature/humidity sensor and a raindrop sensor. While the previous chapter used the basic digital input, the DHT11 temperature sensor will give us the opportunity to use a third-party library, and the raindrop sensor will use an analog pin. We will also introduce a couple of handy functions that we can use.

In this chapter, you will learn:

  • How to add third-party libraries to a sketch
  • How to use the isnan() function
  • How to use the map() function
  • How to use the DHT11 temperature and humidity sensor
  • How to use a rain sensor

Get Mastering Arduino 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.