diff options
-rw-r--r-- | fruitfly.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fruitfly.py b/fruitfly.py index 53d20e2..ea58818 100644 --- a/fruitfly.py +++ b/fruitfly.py @@ -14,11 +14,13 @@ client = paho.Client(client_id) print("connecting to broker " + broker) client.connect(broker) +print("connected") client.loop_start() while True: humidity, temperature = Adafruit_DHT.read_retry(sensor_type, sensor_pin) - + print(client_id+"/temperature: "+ temperature)) + print(client_id+"/humidity: "+ humidity) client.publish(client_id+"/temperature", temperature) client.publish(client_id+"/humidity", humidity) |