Jump to content

DHT11 on NanoPi Neo Core 2


Rafal

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines