Problems resetting boot.py and main.py

299 views
Skip to first unread message

Jason Easton

unread,
Oct 7, 2020, 2:06:30 AM10/7/20
to thonny

Hi Aivar,

I am teaching a class right now on robotics and am super passionate about the transition from Arduino to MicroPython. 

Some problems that my students are currently experiencing when using your platform are the following:

When they create a PWM output for a pin that does not support PWM ex: (led = PWM(3, Pin.OUT), frequency)) and upload this file as main.py or boot.py onto our microcontroller, we run into the following problems:

  • Students can’t connect to their devices to make modifications to the main.py or boot.py methods. Every time we try reconnecting we get that there is a problem with Thonny’s backend and the screen. Screenshot attached below
  • Students can’t view their current boot.py or main.py scripts that are uploaded from the Thonny IDE
  • Students can’t use the Send EOF/Soft reboot option to restart their current boot.py and main.py scripts

The trivial solution is to reset the firmware from micropython.org by going to interpreter and selecting “Open the dialog to install Micropython on your device”, but this is too complicated for students. Is there a current feature on the Thonny IDE where we could connect to our microcontroller and modify the boot.py or main.py code once we exprience this error? Alternatively, could we press a button to reflash or reset the firmware on our microcontroller? I saw that there is a Send EOF / Soft reboot button, but it doesn't work. 

Thonny IDE is a great tool for the classroom and it’s really helping the transition to MicroPython. Thank you for your help!

Other_backend_crash.png
Original_message.png
Soft_reset.png
Thonny_Backend.png

Aivar Annamaa

unread,
Oct 9, 2020, 11:37:29 AM10/9/20
to Jason Easton, thonny
Hi Jason!

At first I recommend you to try Thonny 3.3b2: https://github.com/thonny/thonny/releases/tag/v3.3.0b2

If this does not help, then you could add a small delay (eg. sleep(2)) in the beginning of your main.py, which creates a window of time after hard restart when you are able to interrupt the interpreter and replace the files if required.

Please let me know if any of these recommendations work for you!

Best regards,
Aivar

--
You received this message because you are subscribed to the Google Groups "thonny" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thonny+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thonny/dd885f02-19af-4f66-a4e0-ae6370e5c582n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages