Setup and Using MicroPython for Beginners

Pages
Contributors: Christo-boots with the-pher, Member #1919784

Installing Firmware

SparkFun Firmware Updater

The recommended way to install MicroPython firmware on a SparkFun board is with the SparkFun MicroPython Firmware Updater. Follow the instructions in that repository to download and install the correct firmware updater version for your computer. Then you can utilize the app to flash your board directly with the latest firmware from GitHub or a custom firmware file from another source. If you follow this route you can skip the platform-specific methods below.

You can also get our latest MicroPython firmware for your board from our directly from MicroPython release page and flash with the dedicated method for your platform. Different platforms have different methods of flashing:

RP2 Boards

While connected to your computer, hold the "boot" button on the RP2 board while you press and release the "reset" button to enter bootloader mode. Your board will appear as a regular drive on your computer that you can add files to. Drag and drop the correct .uf2 file from the most recent release from the link above onto your board and it will reboot, now running MicroPython.

Connect to it with one of the suggested development environments below.

ESP32 Boards

Download the .zip archive for your board from the release link above and extract it. If you have not already, download the esptool utility. Then, use esptool to flash your board using the command specified below. Make sure you run the command from within that directory as well. For example, one ESP32 release contains a bootloader.bin, partition-table.bin, micropython.bin, and README.md. By reading the README.md I see that the command I must run FROM WITHIN THIS EXTRACTED DIRECTORY is:

python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 4MB --flash_freq 40m 0x1000 bootloader.bin 0x8000 partition-table.bin 0x10000 micropython.bin

Connect to it with one of the suggested development environments below.