micropython/tests/wipy/reset/reset.py

18 lines
342 B
Python
Raw Normal View History

"""
2015-09-26 21:55:24 +01:00
Reset script for the cc3200 boards
This is needed to force the board to reboot
with the default WLAN AP settings
"""
2015-09-26 21:55:24 +01:00
2015-09-27 12:45:48 +01:00
from machine import WDT
2015-09-26 21:55:24 +01:00
import time
2015-09-27 12:45:48 +01:00
import os
mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
raise Exception("Board not supported!")
2015-09-26 21:55:24 +01:00
wdt = WDT(timeout=1000)
print(wdt)
time.sleep_ms(900)