boot.py 350 B

1234567891011121314151617181920
  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 stubs to Python path.
  12. sys.path.insert(0, "/stublibs")
  13. # Enable gc after allocation of this many bytes:
  14. gc.threshold(2**11)
  15. gc.collect()