probably nearly final
This commit is contained in:
parent
773fd8c35c
commit
021a39b53c
@ -4,6 +4,7 @@ import smbus
|
||||
import time
|
||||
import paho.mqtt.client as mqt
|
||||
from datetime import datetime
|
||||
import _thread
|
||||
|
||||
bus = smbus.SMBus(1)
|
||||
mqtc = mqt.Client()
|
||||
@ -195,6 +196,9 @@ def init_mqtt():
|
||||
mqtc.on_message = on_message
|
||||
mqtc.on_connect = on_connect
|
||||
mqtc.on_subscribe = on_subscribe
|
||||
|
||||
_thread.start_new_thread(i2c_status_thread, ())
|
||||
|
||||
mqtc.loop_forever()
|
||||
|
||||
init_mqtt()
|
||||
|
Loading…
x
Reference in New Issue
Block a user