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

Smart thermostat

In Chapter 9, Environment Sensors, we saw how an Arduino could read the temperature and humidity with the DHT-11 temperature/humidity sensor. If we connected a window or portable air conditioning unit or a humidifier to a relay board, as described in Chapter 17, Using a Relay, we can tune the air conditioning unit and/or humidifier on or off automatically.

In fact, using a relay board, you can turn almost any AC, powered device on or off depending on what various sensors read. For example, we could very easily create our own clapper clone by connecting a sound sensor to the Arduino and using the Arduino to turn a relay on or off each time it detects a loud sound.

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