Lably
Skip to content

MicroPython

Microcontroller software based on Python

  • 10 min read
  • 7 chapters

Related on Lably

Through Software, Python (programming language) and Operating system

MicroPython consists of a Python compiler to bytecode and a runtime interpreter of that bytecode. The user is presented with an interactive prompt (the REPL) to execute supported commands immediately. Included are a selection of core Python libraries; MicroPython includes modules which give the programmer access to low-level hardware.

MicroPython does have an inline assembler, which lets the code run at full speed, but it is not portable across different microcontrollers.

The source code for the project is available on GitHub under the MIT License.

History

MicroPython was originally created by the Australian programmer Damien George, after a successful Kickstarter-backed campaign in 2013. The original Kickstarter campaign released MicroPython with an STM32F4-powered development board "pyboard". In the meantime MicroPython has been developed to support a number of ARM based architectures. The ports supported in the mainline are ARM Cortex-M (many STM32 boards, RP2040 boards, TI CC3200/WiPy, Teensy boards, Nordic nRF series, SAMD21 and SAMD51), ESP8266, ESP32, 16-bit PIC, Unix, Windows, Zephyr, and JavaScript. Also, there are many forks for a variety of systems and hardware platforms not supported in the mainline.

In 2016, a version of MicroPython for the BBC Micro Bit was created as part of the Python Software Foundation's contribution to the Micro Bit partnership with the BBC.

In July 2017, MicroPython was forked to create CircuitPython, a version of MicroPython with emphasis on education and ease of use. MicroPython and CircuitPython support somewhat different sets of hardware (e.g. CircuitPython supports Atmel SAM D21 and D51 boards, but dropped support for ESP8266). As of version 4.0, CircuitPython is based on MicroPython version 1.9.4.

In 2017, Microsemi made a MicroPython port for RISC-V (RV32 and RV64) architecture.

In April 2019, a version of MicroPython for the Lego Mindstorms EV3 was created.

In January 2021, a MicroPython port for the RP2040 (ARM Cortex-M0+, on Raspberry Pi Pico and others) was created.

Sign in to keep reading

6 more chapters are free with a Lably account.

More in Computing and communication