gabormojzes / raspberrypi-dht-reader

A Python class designed for reading data from a DHT11/DHT22 sensor via GPIO, providing humidity and temperature values.
MIT License
3 stars 0 forks source link

incorrect data temperature is less than 0 #1

Open mayorof1 opened 7 months ago

mayorof1 commented 7 months ago
Humidity: 30.4% Temperature: 0.2°C
Humidity: 30.0% Temperature: 0.2°C
Humidity: 29.7% Temperature: 0.2°C
Humidity: 29.5% Temperature: 0.2°C
Humidity: 29.3% Temperature: 0.1°C
Humidity: 29.2% Temperature: 0.1°C
Humidity: 29.2% Temperature: 0.1°C
Humidity: 29.2% Temperature: 0.1°C
Humidity: 29.1% Temperature: 0.0°C
Humidity: 29.1% Temperature: 0.1°C
Humidity: 29.2% Temperature: 0.0°C
Humidity: 29.0% Temperature: 0.0°C
Humidity: 29.0% Temperature: 409.5°C
Humidity: 28.9% Temperature: 409.5°C
Humidity: 28.9% Temperature: 0.0°C
Humidity: 29.0% Temperature: 409.5°C
gabormojzes commented 7 months ago

Hi mayorof1,

I was unable to reproduce the problem using the specified configuration: Python 3.11.6 Ubuntu Server 23.10 (fresh installation) Raspberry Pi 5

Could you please provide additional details about your setup?

Screenshot 2024-02-25 at 13 43 59
mayorof1 commented 7 months ago

Python 3.11.2 Debian GNU/Linux 12 (bookworm) Raspberry Pi 5

gabormojzes commented 7 months ago

I was unable to reproduce the problem using the specified configuration: Python 3.11.2 Raspberry Pi OS (64-bit) (port of Debian Bookworm) Raspberry Pi 5

Screenshot 2024-02-25 at 15 53 31

I assume you're utilising the DHT22 instead of the DHT11, and it's functioning properly.

mayorof1 commented 7 months ago

AM2302 DHT22 Sensor

gabormojzes commented 7 months ago

If you've got an extra micro SD card, you can put Ubuntu Desktop/Server 23.10 on it using the Raspberry Pi Imager. If the numbers still seem wrong, then it probably means the sensor (AM2303 DHT22) is faulty.

I have these sensors: https://www.az-delivery.uk/products/dht22-temperatursensor-modul https://www.az-delivery.uk/products/dht-11-temperatursensor-modul