O'Reilly logo

Mastering Arduino by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required