Skip to content
Discussion options

You must be logged in to vote

I have no idea what causes the reboot.

To recover from the boot loop, you will need to erase the flash and install micropython again.

For further experiments, it is good practice to have a sleep(5) or similar at the beginning of main(), so you have some time to interrupt the thing for cases like the one you just found.

For myself, I decided that I will not touch main.py or boot.py until my application runs somewhat stable. Therefore, my code goes into a file app.py and I'm running the my tests by typing import app; app.run() into the REPL.

My standard main.py reads:

import machine
import time

def main():
    run = True
    cause = machine.reset_cause()
    if cause == machine.SOFT_RESET:…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PWSJA
Comment options

Answer selected by PWSJA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants