#ReadTemperatureRead Temperature sensor
def ReadTemperature(places):
humidity,temperature = Adafruit_DHT.read_retry(sensor,pin)
temperature = round(temperature,places)
return temperature
while True:
#Take Temperature reading via DHT22
temperature_percentage = ReadTemperature(2)
2.1m questions
2.1m answers
60 comments
57.0k users