Merge branch 'master' into docs

This commit is contained in:
Fabio Manganiello 2018-06-26 00:17:28 +02:00
commit 8a0ca64e4d
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,23 @@
import time
import platypush.plugins.gpio.zeroborg.lib as ZeroBorg
no_msg_timeout = 0.37
last_msg = None
last_msg_timestamp = None
auto_mode = False
ZB = ZeroBorg.ZeroBorg()
ZB.Init()
while True:
ZB.GetIrMessage()
if ZB.HasNewIrMessage():
message = ZB.GetIrMessage()
print('Received message: {}'.format(message))
last_msg = message
last_msg_timestamp = time.time()
# vim:sw=4:ts=4:et: