fixed bug in temperature reader
This commit is contained in:
@@ -17,7 +17,7 @@ else:
|
|||||||
|
|
||||||
# Try to grab a sensor reading. Use the read_retry method which will retry up
|
# Try to grab a sensor reading. Use the read_retry method which will retry up
|
||||||
# to 15 times to get a sensor reading (waiting 2 seconds between each retry).
|
# to 15 times to get a sensor reading (waiting 2 seconds between each retry).
|
||||||
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
|
humidity, temperature = Adafruit_DHT.read_retry(SENSOR_TYPE, GPIO_PIN)
|
||||||
|
|
||||||
# Un-comment the line below to convert the temperature to Fahrenheit.
|
# Un-comment the line below to convert the temperature to Fahrenheit.
|
||||||
# temperature = temperature * 9/5.0 + 32
|
# temperature = temperature * 9/5.0 + 32
|
||||||
|
|||||||
Reference in New Issue
Block a user