How to connect DHT22 Temperature/Humidity sensor?

Hi, friends! How to connect DHT22 Temperature/Humidity sensor?

We have ArchLinux (kernel5.16.10) installed, GPIOH_4 on pin37.

Here is an Python3 test:

import board
import adafruit_dht
dhtDevice = adafruit_dht.DHT22(board.GPIOH_4)

And nothing else…
What is wrong? Uboot? dtb?

Might have to back peddle and install kernel 4.9. GPIO changed with kernel 5.3 and up, its not Khadas fault, they are still supporting WiringPi type library.

It should work fine with the ubuntu 20.04 and 4.9 kernel.

Ubuntu is good choice, but i have kernel panic under netdev.c when i have pci-e Atheros QCA6174 Wifi card installed.

Are you looking at your error codes using UART to a terminal?

What is it? ))

I will try kernel 5.2 to build.

I was referring to the serial debug mode. You need a USB to ttl converter and use minicom on a linux box to get the information from the VIM3 as it boots and throws error messages.

Make sure you have the proper device tree overlay selected. Check your boot/env.txt file and it will show what overlays are being loaded. Because depending on the pins you are using you might have to remove a couple of the overlays since they are multiplexed. Its best if you only need the i2c to just load that one and remove the others from the line.

Maybe no gpio in dtb file present? See here: meson-g12b-a311d-khadas-vim3.dts -

P.S.The board not starting with Arch linux kernel 5.2, kernel compiled, installed = ok, but not started… :slight_smile:

Problem solved by adding pulseIn helper to read pwm signals to Adafruit_Blinka.

Показания датчика Aosong DHT22:
Температура: 24.7°С
Влажность: 22.0%
Точка росы: 0.1°С