diff options
author | Joe Robinson <joe@lc8n.com> | 2019-02-17 21:08:12 +0000 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2019-02-17 21:08:12 +0000 |
commit | 5099305dde9fc0d873518ab3e7334f0701446388 (patch) | |
tree | 3879a611ccba942e1e366f72560e7ce2a90f5369 /fruitfly.py | |
parent | c3dce2074f975e7c58e9f1d0591cc01ecdfe1103 (diff) |
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) |