DHTXX Devices

Some devices may require the DHTXX library installed and running. To do this, follow these steps to prepare.

Get the pigpio library and install it

sudo apt-get install pigpio python-pigpio python3-pigpio

Then download DHTXXD into a directory

mkdir DHT22
cd DHT22

unzip the DHTXXD.zip file

unzip DHTXXD.zip

Compile the DHTXXD

gcc -Wall -pthread -o DHTXXD test_DHTXXD.c DHTXXD.c -lpigpiod_if2

once done, the program DHTXXD will be available in this directory: /home/pi/DHT22/DHTXXD Remember this, you will need to recall this for later.

Now connect the DHT22 as shown ![DHT22 Wiring diagram](DHT22.png)