micropython/tests/wipy/reset/reset.py

18 lines
342 B
Python
Raw Normal View History

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