summaryrefslogtreecommitdiff
path: root/fruitfly.py
diff options
context:
space:
mode:
authorJoe Robinson <joe@lc8n.com>2019-02-17 21:08:12 +0000
committerJoe Robinson <joe@lc8n.com>2019-02-17 21:08:12 +0000
commit5099305dde9fc0d873518ab3e7334f0701446388 (patch)
tree3879a611ccba942e1e366f72560e7ce2a90f5369 /fruitfly.py
parentc3dce2074f975e7c58e9f1d0591cc01ecdfe1103 (diff)
convert to stringĀ£HEADmaster
Diffstat (limited to 'fruitfly.py')
-rw-r--r--fruitfly.py8
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)