Print Friendly, PDF & Email

Difficulty level: Beginner

Approx reading time:

Components Required:

1. Raspberry Pi 3 model B

2. MicroSD card 8 or 16 GB (Class 4 and above) with Raspbian

3. Windows PC / Linux PC (Tested on Windows 10, Ubuntu 14.04 LTS)

4. Ethernet cable (Category 5 – also called Cat 5)

5. Micro USB cable

6. Breadboard

7. DHT11 Sensor

8. Jumper Wires (Male to Female, Male to Male)

Way to go ->

1. Login to your Pi using PuTTy or your Ubuntu terminal.

2. Login to your Pi GUI using VNC server (Linux / Windows).

3. In Python 3 (IDLE), create a new file. 

4. The name could be: DHT11Read.py.

5. In the file DHT11Read.py, write the following code with comments (line starting with “#”) for clear understanding and save (press Cntrl + S on your PC keyboard) the file.

Before running the python script do the following:

6. In the terminal type: 

7. Download the Adafruit DHT11 library. In the terminal type:

8. Navigate to to Adafruit_Python_DHT directory (folder), in the terminal type: 

9. Run the following commands in the terminal.

10. To install the library, in the terminal type:

11. Finally, run the script by clicking on Run -> Run Module in the menu bar or by pressing F5 on your PC keyboard.

DigiTempOutput

Hardware Connections ->

1. Raspberry Pi 3 GPIO Header.

pi3_gpio

2. DHT11 to Pi connections.

PiToDHT

 

 DHT11Read_schem

DHT11Read_bb

Read full tutorial at

Rating widget: