print the pin number and state of received mqtt message to terminal.
This commit is contained in:
parent
da9965cb41
commit
0ec2abb46e
1 changed files with 3 additions and 2 deletions
|
@ -136,6 +136,9 @@ def on_connect(client, userdata, flags, response_code):
|
|||
def on_message(client, userdata, message):
|
||||
print("Received message '" + str(message.payload) + "' on topic '"
|
||||
+ message.topic + "' with QoS " + str(message.qos))
|
||||
pin_number = str(message.payload)[12:13]
|
||||
pin_state = str(message.payload)[6:9]
|
||||
print("pin number: " + pin_number+ " pin state: " + pin_state)
|
||||
proot_state = ProotState()
|
||||
proot_state.blink()
|
||||
|
||||
|
@ -158,5 +161,3 @@ while True:
|
|||
pass
|
||||
|
||||
|
||||
# TODO create a splash screen to display super quick before the rest of the assets are loading
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue