Connecting DHT22 throught DHT11 overlay

I want to read data from DHT22 sensor but since it uses its own OneWire protocol, w1-gpio overlay does not work.

I know there is nerves_dht package but it actually uses Python library to read data from DHT sensors and I want to avoid using it.

There is dht11.dtbo overlay (https://github.com/raspberrypi/firmware/blob/master/boot/overlays/dht11.dtbo) which works well with DHT22 and DHT11 sensors. It saves data in

/sys/bus/iio/devices/iio:device0/in_temp_input

but it seems Nerves does not support it.

Namely when I connect sensor and enable this overlay in Raspbian everything works fine but when I do the same in Nerves iio folder does not appear.

Does Nerves support this overlay?

1 Like

In case anybody needs it solution is to create custom Nerves system with additional two lines in linux-4.19.defconfig file:

CONFIG_IIO=y
CONFIG_DHT11=y

and adding dht11 overlay in config.txt and fwup.conf files.

2 Likes