To complete home automation, we will use our Raspberry Pi Zero W board and a DHT11 temperature and humidity sensor. The DHT11 sensor is able to test both temperature and humidity. It is pretty easy to set it up and we will do this using a library. First of all, let's start connecting things together. The DHT11 sensor consists of only three pins, one for the ground, one for the 5V and the last one for the signal. We have to carefully connect them to the appropriate pins in our Raspberry Pi Zero W board. In the following image, you can find the pinout of the board:
If this project is brand new and not an add-on, all pins should be available; so, connect the ground pin of the sensor to pin 9. Next, connect the 5V pin of the sensor to pin 2, and finally, connect the signal pin of the sensor to pin 7. It is important to be connected to pin 7, since we will later...