a guest May 19th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def on_message(client, userdata, msg):
  2.     print(msg.topic+" "+str( msg.payload))
  3.     running = False
  4.     if msg.topic == 'signal':
  5.         if ( msg.payload == b'action' or msg.payload == b'hello world' ) and running == False:
  6.             running = True
  7.             record()
  8.             running = False
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand