How can I use DHT22 on Jetson Nano?

I would like to ask how I can use DHTT22 on Jetson Nano? Thank you.

easy :)
dht22-temperature-and-humidty-sensor-circuitry-wiring

How about the programming part? If I would like to use Jetson Nano Developer Kit to read the DHT22 data, are there any coding samples? Thank you.

I think you can reference to the Arduino to know the detail of the programing.

I refer to GitHub - GrgoMariani/NVidia-Jetson-DHT22-Python: A python library to read temperature and humidity from DHT22 sensor, I use DHT22 on Jetson Nano. I did change the Pin0 number to jetsonnano_pin37. However, the value I got is (-39909.0, -39909.0,0). Could you please give me some comments on this?

Looks like the checksum is not OK to return -39909

static PyMethodDef C_DHT22Methods[] = {
	{"readSensor", 		readSensor, 		METH_VARARGS, "Read all sensor values and return (float)temperature, (float)humidity and (0 or 1)message validity. If checksum not OK return -39909 (ERROR) as Humid and Temperature"},
	{"readSensorDHT11", readSensorDHT11, 	METH_VARARGS, "Read all sensor values and return (float)temperature, (float)humidity and (0 or 1)message validity. If checksum not OK return -39909 (ERROR) as Humid and Temperature. (Only for DHT11)"},
	{NULL, NULL, 0, NULL}
};

Have a probe the GPIO pin 12 to confirm if it working well by /sys/class/gpio.

The GPIO pin 12 is working and I can use this pin to control the LED.

Well, maybe need consult with vendor what kind of condition would cause checksum failed.

@phon211821 you would need to read in a loop, so on 4 checksums error there will be likely 1 correct value. However, you should ask the vendor of the jetson developers board also the sensor vendor also the driver creator to get more gaps adressed.

I tried different pins and also ran the code in the while loop. However, the checksums error exist. I will ask them for more information. Thank you.

this line likely needs to be reconfigured

// This is currently set to work with Jetson Xavier
Did you add the 10Ohm to DHT22? how many legs does it have? Does it have the resistor inside or needs it to be added?

I changed the PIN0 and PIN1 to jetsonnano_pin37 jetsonnano_pin29 respectively. I try different circuit connections (i.e. with or without resistance). It does not work. My DHT22 has 3 legs. I did not know whether there is any resistance inside. However, I can read the data via Arduino UNO without any resistance. Thank you.

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