micropython/tests/wipy/reset/reset.py

18 wiersze
342 B
Python
Czysty Zwykły widok Historia

2015-09-26 20:55:24 +00: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 11:45:48 +00:00
from machine import WDT
2015-09-26 20:55:24 +00:00
import time
2015-09-27 11:45:48 +00: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 20:55:24 +00:00
wdt = WDT(timeout=1000)
print(wdt)
time.sleep_ms(900)