Xavier NX dht sensor

Hi,
I’m using dht22 sensor which can measure temperature and humidity on my JetsonNX board.
But the problem is GPIO pin connection issue and I can’t find libraries about JetsonNx .
I wonder how to connect sensor with Xavier NX using GPIO pins.
Or Do I need use any converter??

There are two ways I tried to.
First, Even I tried to use NVidia-Jetson_DHT22-Python github, but there is no information with JetsonNX
So I added JetsonNX GPIO on /NVidia-Jetson-DHT22-Python/jetsonGPIO/jetsonGPIO.h but I got result “-399093.0, -39909.0,0” I connected to 13pin which means SPI1_SCK.

Second, I used adafruit_DHT library.
In the terminal I commanded

import adafruit_dht
import board

dht_device = adafruit_dht.DHT22(board.D27, use_pulseio=False)

temperature = dht_device.temperature
humidity = dht_device.humidity

print(temperature)
print(humidity)

Then I get
“/usr/local/lib/python3.6/dist-packages/Jetson.GPIO-2.0.17-py3.6.egg/Jetson/GPIO/gpio.py:370: UserWarning: Jetson.GPIO ignores setup()'s pull_up_down parameter
Traceback (most recent call last):
File “dhtcode2.py”, line 6, in
temperature = dht_device.temperature
File “/home/humani/.local/lib/python3.6/site-packages/adafruit_dht.py”, line 259, in temperature
self.measure()
File “/home/humani/.local/lib/python3.6/site-packages/adafruit_dht.py”, line 211, in measure
raise RuntimeError(“DHT sensor not found, check wiring”)
RuntimeError: DHT sensor not found, check wiring
Exiting…
Cleaning up pins”

I think board.D27 = pin 13.

In these case What should I do??

hello eybae,

there’s sample, https://github.com/GrgoMariani/NVidia-Jetson-DHT22-Python/blob/master/C_DHT.c , which currently set to work with Jetson Xavier,
you may also compare 40-pin expansion header for AGX Xavier and Xavier NX.

Thx for reply. I used NVdia-Jetson-DHT22 on github, but the result is still (-39909.0, -39909.0, 0).
Even there is no library about JetsonNX on /jetsonGPIO/jetsonGPIO.h

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.