This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:iot-open:scriptingprogramming:micropythonfundamentals [2023/11/23 13:44] – [Installation] pczekalski | en:iot-open:scriptingprogramming:micropythonfundamentals [2024/05/24 09:54] (current) – [Installation] pczekalski | ||
---|---|---|---|
Line 17: | Line 17: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Installation of the Micropython usually involves flashing firmware, specific | + | Installation of Micropython usually involves flashing firmware specific |
- | A website that is a starting point for Micropython is https:// | + | A website that is a starting point for Micropython is Micropython.org ((https:// |
The installation procedure is specific to the hardware platform and sometimes differs slightly from flashing C++-based solutions or burning an OS, as in the case of the RP2040. The main steps to prepare a working environment are presented below: | The installation procedure is specific to the hardware platform and sometimes differs slightly from flashing C++-based solutions or burning an OS, as in the case of the RP2040. The main steps to prepare a working environment are presented below: | ||
* Download a Micropython binary image suitable for your hardware. | * Download a Micropython binary image suitable for your hardware. | ||
* Switch the MCU into the bootloader mode that exposes a flash drive: in the case of the RP2040, the easiest way is to hold down the //Bootsel// button and power on the device while holding. | * Switch the MCU into the bootloader mode that exposes a flash drive: in the case of the RP2040, the easiest way is to hold down the //Bootsel// button and power on the device while holding. | ||
- | * Move the firmware file into the flash drive; the device will flash and reboot. | + | * Move the firmware file into the flash drive; the device will flash the file to the memory |
* Connect to the serial port exposed. | * Connect to the serial port exposed. | ||
- | ==== Development ==== | + | ===== Development |
- | Once Micropython is installed in the device, it exposes a terminal (REPL) via serial port, either on the dedicated GPIOs for serial or via serial over USB. Developing directly inline is possible (samples are presented in the following chapters) but it is not convenient for complex code. Complex and multi-file solutions can benefit from uploading files (even multiple) to the device. A file named '' | + | Once Micropython is installed in the device, it exposes a terminal (REPL) via serial port, either on the dedicated GPIOs for serial or via serial over USB. Developing directly inline is possible (samples are presented in the following chapters), but it is not convenient for complex code. Complex and multi-file solutions can benefit from uploading files (even multiple) to the device. A file named '' |
IDEs use those features to simplify development and enable remote code authoring and execution. | IDEs use those features to simplify development and enable remote code authoring and execution. | ||
+ | |||
+ | Sample Micropython development toolchain installation with Thonny IDE one can find on the web ((https:// | ||
+ | |||