Rafal Posted March 6, 2019 Posted March 6, 2019 Hi. I would like to ask you how to add and read temperature and humidity from sensor DHT11 on Nano Pi Neo Core 2 with armbian. I want to use PA13 pin (CS form SPI1) I try to enable overlay: sudo modprobe dht11 cat /sys/bus/iio/devices/iio:device0/in_temp_sclae return : -119 When I try add dht11 to overlay in /boot/armbianEnv.txt this module after reboot is still disable. Any suggestions?
guidol Posted March 6, 2019 Posted March 6, 2019 couldnt you enable it via armbian-config -> system -> hardware?
martinayotte Posted March 6, 2019 Posted March 6, 2019 12 minutes ago, Rafal said: When I try add dht11 to overlay in /boot/armbianEnv.txt Which overlay are you talking about ? Although it look physically to be a OneWire interface, it is not compatible on software side to real OneWire ! You would need to use libraries that do software bitbanging over plain GPIO, like this one : https://github.com/adafruit/Adafruit_Python_DHT.git
Rafal Posted March 6, 2019 Author Posted March 6, 2019 Quote You would need to use libraries that do software bitbanging over plain GPIO, like this one : https://github.com/adafruit/Adafruit_Python_DHT.git I tried to read data from this phyton library but when I try to simpletest.py the error is: File "/usr/local/lib/python3.5/dist-packages/Adafruit_DHT-1.4.0-py3.5-linux-aarch64.egg/Adafruit_DHT/common.py", line 63, in get_platform raise RuntimeError('Unknown platform.') RuntimeError: Unknown platform.
martinayotte Posted March 6, 2019 Posted March 6, 2019 9 minutes ago, Rafal said: but when I try to simpletest.py the error is Of course, I didn't try it myself. This library is made to be compatible with official Raspberry boards, so to make it compatible with other board, there would need some development works to be done for platform detection.
martinayotte Posted March 6, 2019 Posted March 6, 2019 Maybe this one is easier ? https://github.com/jingl3s/DHT11-DHT22-Python-library-Orange-PI
Rafal Posted March 7, 2019 Author Posted March 7, 2019 Thanks for the links. I' m working on armbian 5.75 stable debian on my nano pi neo core 2. I modify WiringNP library to my armbian version and it works great.
Recommended Posts