Wiznet makers

ruilixin6

Published July 29, 2026 ©

29 UCC

0 VAR

0 Contests

0 Followers

0 Following

Embedded 101: MicroPython — Born in 6 Months by 27 Cambridge Undergraduates, Full History Guide

This article covers MicroPython’s development timeline, introduces PyMite, and compares the differences between MicroPython and its derivative CircuitPython.

COMPONENTS
PROJECT DESCRIPTION

【Preliminary Note】The original hardware example in this article was written based on the RP2040. The actual hardware used in this hands-on demonstration features the W55RP20 as the main controller chip. The circuit logic and UF2 flashing operation principles are universally applicable, with only the main controller model differing. The original chip model mentioned in the circuit descriptions below is provided for reference purposes only.

1. Development History of the MicroPython Language

In recent years, the popularity of Python has skyrocketed. Today, its usage is ubiquitous, spanning from DevOps to statistical analysis and even desktop software. However, for a long time, there was a notable absence of Python in the embedded domain. This all changed in 2013, when Damien George launched a Kickstarter crowd funding campaign. Damien was an undergraduate at the University of Cambridge and an avid robotics programmer.He wants to shift the Python ecosystem from machines with gigabyte-scale capacity to those with kilobyte-scale capacity. He attempted to fund his development via a Kickstarter crowd funding campaign, while turning the Proof of Concept into a final implementation.
Figure 1.1 Damien George, founder of MicroPython
Damien spent six months developing MicroPython. MicroPython itself is developed using GNU C, implements the basic functions of Python 3 on STMicroelectronics' microcontrollers, and is equipped with a complete parser, compiler, virtual machine and class libraries. On the basis of retaining the main features and basic functions of the Python language, he also encapsulated common embedded functions, and wrote dedicated driver libraries for some common hardware and sensors.
The original Kickstarter campaign released MicroPython for the "pyboard" development board driven by STM32F4, a hardware development board specifically designed to run MicroPython as an operating system (OS). The board is equipped with 4 LED indicators of different colors, a 3-axis accelerometer, and a microSD socket, allowing users to download programs and upgrade firmware via USB.
Figure 1.2 MicroPython development board pyboard
MicroPython supports embedded hardware platforms, and the chips supported in its mainline include ARM Cortex-M series chips (STM32, RP2040, TI CC3200), ESP8266, ESP32,16-bit PIC, etc.
In 2016, a MicroPython version was created for the BBC Micro Bit as part of the Python Software Foundation's contribution to the partnership between the Micro Bit and the BBC.
In July 2017, MicroPython was forked to create CircuitPython, a version of MicroPython that emphasizes education and ease of use. MicroPython and CircuitPython support slightly different sets of hardware (for instance, CircuitPython supports Atmel SAM D21 and D51 boards, but has dropped support for the ESP8266).Starting from version 4.0, CircuitPython is based on MicroPython version 1.9.4. [
In 2017, Microsemi developed a MicroPython port for the RISC-V (RV32 and RV64) architecture.
In April 2019, a version of MicroPython for Lego Mindstorms EV3 was created.
In January 2021, the MicroPython port for the RP2040 (ARM Cortex-M0+) was created.
Apart from MicroPython, there are other scripting languages available for embedded systems, such as Lua, JavaScript, and MMBasic. However, none of them can match MicroPython in terms of functional completeness, performance, portability, ease of use, or the availability of supporting resources.

2. Other examples of embedded programming using Python

2.1 PyMite

PyMite is a lightweight Python interpreter written from the ground up, designed to run on 8-bit and larger microcontrollers with limited resources: 64 KiB of program memory (flash) and 4 KiB of RAM. It supports a subset of Python 2.5 syntax and can execute a subset of Python 2.5 bytecode. PyMite can also be compiled, tested and run on desktop computers.

2.2 CircuitPython

CircuitPython is a programming language based on MicroPython, designed to simplify experimentation and learning through coding on low-cost microcontroller boards. Most CircuitPython libraries can also run on single-board computers (SBCs) such as the Raspberry Pi. Linux runs "desktop" Python (commonly referred to as CPython) rather than CircuitPython.

3.CircuitPython和MicroPython的区别

CircuitPython is a beginner-friendly open-source version of Python. Built on MicroPython, it is designed for small, low-cost computers known as microcontrollers. Microcontrollers serve as the core processing unit of numerous electronic devices, including a wide range of development boards used for building hobby projects and prototypes.
CircuitPython in electronics is one of the best ways to learn coding, as it connects code to the real world. Typically, you only need to install CircuitPython on a supported USB board via drag-and-drop, then code. py file on the CIRCUITPY drive to edit it. The code will reload automatically. No software needs to be installed other than a text editor (we recommend one for beginners).
Compared with MicroPython, the most intuitive differences of CircuitPython are as follows:
CircuitPython treats the microcontroller as a USB flash drive, and after connecting it to a computer, you can carry out development using the file manager and text editor that come with the computer's operating system;
CircuitPython simplifies many operations. For example, there are only two operations, Ctrl-C and Ctrl-D, in its REPL, while MicroPython has five; in CircuitPython, saving a file by default triggers it to run immediately.
CircuitPython also removes the interrupt functionality from MicroPython, retaining only the async feature;
CircuitPython emphasizes the versatility of code and has created a unified hardware at the API level. As long as the hardware supports it, it strives to enable code written for Chip A to run on Chip B without any modification; while MicroPython involves operations such as import esp and import pyb.
Documents
Comments Write