In the previous article we connected the DHT11 sensor to the Beaglebone
We install at this point the library in python and modules in c to read the sensor. The site with documentation about the library is
Adafruit Python DHT Sensor Library
Log in ssh on Beaglebone as root / no password and create the temperature folder from which we run
1 2 3 |
mkdir temperature cd temperature git clone https://github.com/adafruit/Adafruit_Python_DHT.git |
Install the prerequisites
1 2 |
apt-get update apt-get install build-essential python-dev |
Proceed to the installation of the library with the python command
1 2 |
cd Adafruit_Python python setup.py install |
Enter the examples directory and do the following for reading the sensor values (dht 11 and pin P8_11)
1 2 |
cd examples ./AdafruitDHT.py 11 P8_11 |
The result in this case is the following