MicroPython


MicroPython is a software implementation of a programming language largely compatible with Python 3, written in C, that is optimized to run on a microcontroller.
MicroPython is a full Python compiler and runtime that runs on the micro-controller hardware. The user is presented with an interactive prompt 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.
The source code for the project is available on GitHub under the MIT License.

History

MicroPython was originally created by the Australian programmer and physicist , after a successful Kickstarter backed campaign in 2013. While the original Kickstarter campaign released MicroPython with an STM32F4-powered development board "pyboard", MicroPython supports a number of ARM based architectures. The ports supported in the mainline are ARM Cortex-M, ESP8266, ESP32, 16bit 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. As of version 4.0, CircuitPython is based on MicroPython version 1.9.4.
In 2017, Microsemi made a MicroPython port for RISC-V architecture.
In April 2019, a version of MicroPython for the Lego Mindstorms EV3 was created.

Bytecode

MicroPython includes a cross compiler which generates MicroPython bytecode. The Python code can be compiled into the bytecode either directly on a microcontroller or it can be precompiled elsewhere.
MicroPython firmware can be built without the compiler, leaving only the virtual machine which can run the precompiled mpy programs.