Closed microbit-matt-hillsdon closed 2 years ago
Recent changes mean this now restarts OK. In the demo it seems to work fine. But in the editor we see serial no longer echos what you type (and perhaps is otherwise broken).
However, it works fine with this program:
n = 0
while True:
n += 1
print(n)
sleep(1000)
OK, so this does actually work but it's a little confusing as there's time/opportunity for the sim to print the next REPL prompt. That made me think serial should be working even though it was actually just busy running the program. I think the reset HAL method should throw similarly to the panic case. Then we can handle it in the same way but just restart.
Sim PR that takes the ResetError approach:
https://github.com/microbit-foundation/micropython-microbit-v2-simulator/pull/54
Sim PR merged. Closing.
Running
in the sim results in the following logged error:
There are likely other negative consequences.