Advertisement
KRITSADA

First Switch Control From Blynk

May 9th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. from PiBlynk import Blynk
  2. import time
  3. def timeNow():
  4.     return time.asctime()[11:19]
  5. token = "f03e2427c07d48d48d998387c659f871"
  6. blynk = Blynk(token)
  7. def cnct_cb():
  8.     print ("Connected: "+ timeNow())
  9. blynk.on_connect(cnct_cb)
  10. blynk.gpio_auto("button")
  11. blynk.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement