Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8023

Automation, sensing and robotics • Re: Inquiry about DHT Sensor (Temperature/Humidity) Operation Issues with GPIO on Raspberry Pi 5

$
0
0
You can use a pigpio-based DHT reader:

Code:

import pigpioimport DHT22import timepi = pigpio.pi()sensor = DHT22.sensor(pi, 4)  # GPIO4while True:    sensor.trigger()    time.sleep(2)    print(f"Temperature: {sensor.temperature()}°C  Humidity: {sensor.humidity()}%")


....
No they cannot.
Sorry. Isn't pigpio supported by Raspberry Pi 5?

Statistics: Posted by crugo — Sun Apr 20, 2025 2:47 pm



Viewing all articles
Browse latest Browse all 8023

Trending Articles