Installing The Adafruit_DHT Library

Installing the required software


The folks over at Adafruit have provided driver software for the PI to interface with the DHT11, DHT22, and AM2302 sensors. It is available on Github.

We also have sensors available in the store with all of the proper cabling for the ATXPiHat.

  • After you backup the memory chip for the PI, (Just do it)
  • It is always good to update the Raspbian image prior to any upgrade. From a terminal prompt;
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install build-essential python-dev
  • Make sure you are in a suitable directory, e.g /home/pi
cd /home/pi
  • Then run the following commands:
git clone
cd Adafruit_Python_DHT
sudo python install
cd ~/oprint/lib/python2.7/
ln -s ~/Adafruit_Python_DHT/build/lib.linux-armv7l-2.7/Adafruit_DHT/ Adafruit_DHT

This should compile, and put the reference for the library in the right place for Octoprint to find it. It is recommended to restart the Pi after all of this is done.

sudo reboot now

Now you can configure the sensors for DHT11/DHT22/AM2302.

%d bloggers like this: