You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
IoT-For-Beginners/2-farm/lessons/1-predict-plant-growth/code-temperature/virtual-device/temperature-sensor/app.py

13 lines
282 B

from counterfit_connection import CounterFitConnection
CounterFitConnection.init('127.0.0.1', 5000)
import time
from counterfit_shims_seeed_python_dht import DHT
sensor = DHT("11", 5)
while True:
_, temp = sensor.read()
print(f'Temperature {temp}°C')
time.sleep(10)