boot.py 398 B

12345678910111213141516171819202122
  1. print("boot.py")
  2. # Start the watchdog first.
  3. if 1:
  4. import machine
  5. watchdog = machine.WDT(timeout=5000).feed
  6. print("Watchdog active.")
  7. else:
  8. watchdog = None
  9. print("Watchdog inactive.")
  10. import sys, gc
  11. # Add to Python path.
  12. sys.path.insert(0, "/stublibs")
  13. sys.path.append("/examples")
  14. sys.path.append("/misc")
  15. # Enable gc after allocation of this many bytes:
  16. gc.threshold(2**11)
  17. gc.collect()