I'm trying to use a Raspberry Pi 4 to read an I2C temperature and humidity sensor. The part I'm using is a module from Grove based on the DHT20 sensor. Here's a link to a page about the module:
https://www.seeedstudio.com/Grove-Temperature-Humidity-Sensor-V2-0-DHT20-p-4967.html
I need some help programming the I2C communication. The specs sheet for the sensor explains the frames that are needed for correct communication (see page 8):
https://files.seeedstudio.com/products/101020932/DHT20-Product-Manual.pdf
I would be grateful if someone could show me the Python code needed to get a sensor reading. Preferably this would be based on the smbus package, but I will be grateful for any solution (based on whatever package you prefer). I understand that there are many answers about the DHT11 and DHT22 sensors, but these older models have one-wire logic whereas the newer DHT20 has I2C.
Thanks!
(2) AHT20 - Temperature & Humidity Sensor Breakout Board Learning Guide- Adafruit https://learn.adafruit.com/adafruit-aht20
(3) AHT20 Temperature Sensor Datasheet - aosong http://www.aosong.com/en/products-32.html
(4) Why are DHT11/DHT22 problematic? - AdaFruit https://learn.adafruit.com/modern-replacements-for-dht11-dht22-sensors/why-are-they-probelmatic
/ to continue, ...
– tlfong01 Nov 25 '21 at 08:24(6) DHT20 GitHub Home - DFRobot https://github.com/DFRobot/DFRobot_DHT20
(7) DHT20 GitHub Python - DFRobot https://github.com/DFRobot/DFRobot_DHT20/tree/master/python/raspberrypi
– tlfong01 Nov 25 '21 at 08:24(9) *DHT20 GitHub Python Program* - DFRobot https://github.com/DFRobot/DFRobot_DHT20/blob/master/python/raspberrypi/DFRobot_DHT20.py
(10) *DHT20 GitHub Python Example* - DFRobot https://github.com/DFRobot/DFRobot_DHT20/blob/master/python/raspberrypi/examples/get_data.py
– tlfong01 Nov 25 '21 at 08:30(12) SHT20 Digital Humidity Sensor Datasheet - Sensirion https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Datasheets/Sensirion_Humidity_Sensors_SHT20_Datasheet.pdf
– tlfong01 Nov 25 '21 at 13:15