Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cjee21/rpi-dht20
Raspberry Pi Python library for DHT20 Temperature and Humidity Sensor with CRC verification.
https://github.com/cjee21/rpi-dht20
aht20 aosong crc crc-8 dht20 humidity-sensor i2c i2c-sensors python python3 raspberry-pi-3 raspberrypi smbus2 temperature-sensor
Last synced: about 2 months ago
JSON representation
Raspberry Pi Python library for DHT20 Temperature and Humidity Sensor with CRC verification.
- Host: GitHub
- URL: https://github.com/cjee21/rpi-dht20
- Owner: cjee21
- License: mit
- Created: 2023-01-16T09:46:55.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T07:03:45.000Z (7 months ago)
- Last Synced: 2024-05-23T08:25:28.227Z (7 months ago)
- Topics: aht20, aosong, crc, crc-8, dht20, humidity-sensor, i2c, i2c-sensors, python, python3, raspberry-pi-3, raspberrypi, smbus2, temperature-sensor
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RPi-DHT20
Raspberry Pi Python library for DHT20 Temperature and Humidity Sensor with CRC verification.## Requirements
This library was tested with the following:
- Aosong DHT20 SIP Packaged Temperature and Humidity Sensor
- Raspberry Pi 3 Model B
- Ubuntu Server 22.10, 23.04, 23.10 and 24.04 LTSSimilar configurations should also work.
## Set up
1. Connect the DHT20 sensor to the Raspberry Pi\
*Note: If a different Raspberry Pi model and/or operating system is used, it may be necessary to change the `I2C_BUS` in `DHT20_demo.py` and/or enable the I2C interface.*2. Install smbus2 Python module that is used for accessing the I2C bus
```
sudo apt install python3-smbus2
```
3. If `/dev/i2c*` does not exist, enable the i2c-dev kernel module by adding the following line to the `/etc/modules` file
```
i2c-dev
```
4. Test by running the demo
```
sudo python3 DHT20_demo.py
```## Usage
Refer to the usage example in `DHT20_demo.py`.## References
- [Aosong DHT20 datasheet](http://www.aosong.com/userfiles/files/media/Data%20Sheet%20DHT20%20%20A1.pdf)
- [Aosong AHT20 sample program](http://aosong.com/userfiles/files/software/AHT20-21%20DEMO%20V1_3(1).rar)
- [DFRobot_DHT20 Raspberry Pi library](https://github.com/DFRobot/DFRobot_DHT20/tree/master/python/raspberrypi)