Advertisement
abudden

main.py

Jan 17th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import time
  2.  
  3. def reset():
  4.     import machine
  5.     machine.reset()
  6.  
  7. def get_ip():
  8.     start_time = time.time()
  9.     while not sta_if.isconnected():
  10.         time.sleep(0.1)
  11.         now = time.time()
  12.         if now - start_time > 10:
  13.             break
  14.     print(sta_if.ifconfig())
  15.  
  16. def main():
  17.     get_ip()
  18.  
  19. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement