Wait more than 2 seconds for better DHT sensor reads
This commit is contained in:
@@ -24,7 +24,7 @@ def get_temperature_and_humidity():
|
||||
return None, None
|
||||
|
||||
|
||||
def get_temperature_and_humidity_with_retry(max_retries=4, retry_delay=1.5):
|
||||
def get_temperature_and_humidity_with_retry(max_retries=4, retry_delay=2.5):
|
||||
"""
|
||||
Reads temperature and humidity with retries.
|
||||
Uses a 1.5s delay between attempts to respect DHT sampling limits.
|
||||
|
||||
Reference in New Issue
Block a user