Page 1 of 1
How do upload code to the board with Thonny
Posted: Tue Mar 08, 2022 8:50 am
by MangoDelight
Hi everyone. I am new to MicroPython. I have been using Arduino for awhile, and I know how to upload sketches to the board.
I have no idea how to upload code to my ESP8266 based board. I have installed the updated firmware, and that went fine. When I log in with a serial terminal I get the >>> prompt. It seems to work fine, but I want to use Thonny and start developing some ideas for my watering system for my large veggie garden. I know you upload a boot.py and a main.py, can someone point me to a guide where this process is explained, as I dont really want to type in walls of text into the >>>> prompt. I am really looking forward to what MicroPython can do.
Thanks.
Re: How do upload code to the board with Thonny
Posted: Tue Mar 08, 2022 8:49 pm
by OutoftheBOTS_
If the board is plugged in when thornny starts up then it usually detects the board and will switch to using the python interrupter on the board. If it doesn't detect then go to tools>Options>interrupter and select the board your using.
Re: How do upload code to the board with Thonny
Posted: Wed Mar 09, 2022 1:34 am
by MangoDelight
Thank you for your answer. I am very impressed by how MicroPython works with these dev boards. I have been using Arduino for some time, and I do understand how the bootloader writes to the onboard flash. I would like to know what these MicroPython dev boards do for saving your code to the device. This is the device is now standalone powered up but no computer attached to it, After is got code uploaded to it.?
Thanks
Re: How do upload code to the board with Thonny
Posted: Wed Mar 09, 2022 9:14 am
by OutoftheBOTS_
So ardunio has a eprom library that allows you to store data to the flash of the MCU. With micropython the remaining flash left after the firmware is uploaded is formatted to a fat32 or spiffs format for storage of your python scripts or any other data you want to write to the flash
Re: How do upload code to the board with Thonny
Posted: Wed Mar 16, 2022 12:14 pm
by gleria
Thanks for this interesting information!
Re: How do upload code to the board with Thonny
Posted: Mon Apr 04, 2022 5:39 pm
by ebolisa
OutoftheBOTS_ wrote: ↑Wed Mar 09, 2022 9:14 am
So ardunio has a eprom library that allows you to store data to the flash of the MCU. With micropython the remaining flash left after the firmware is uploaded is formatted to a fat32 or spiffs format for storage of your python scripts or any other data you want to write to the flash
See
viewtopic.php?t=7820&p=44645
Re: How do upload code to the board with Thonny
Posted: Mon Apr 04, 2022 6:19 pm
by karfas
I don't think there is support for the SPIFFS file system in micropython.
The supported filesystems are FAT and LittleFS (see
https://github.com/littlefs-project/littlefs)