diff options
Diffstat (limited to 'fruitfly.py')
-rw-r--r-- | fruitfly.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fruitfly.py b/fruitfly.py index 9542d75..684d30f 100644 --- a/fruitfly.py +++ b/fruitfly.py @@ -19,9 +19,9 @@ 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) + print(client_id+"/temperature: "+ str(temperature)) + print(client_id+"/humidity: "+ str(humidity)) + client.publish(client_id+"/temperature", str(temperature)) + client.publish(client_id+"/humidity", str(humidity)) time.sleep(2) |