LLMpediaThe first transparent, open encyclopedia generated by LLMs

MicroPython

Generated by DeepSeek V3.2
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Expansion Funnel Raw 68 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted68
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
MicroPython
NameMicroPython
DeveloperDamien George
Released03 May 2014
Latest release version1.23.0
Latest release date28 May 2024
Operating systemCross-platform
GenrePython implementation
LicenseMIT License
Websitehttps://micropython.org

MicroPython. It is a lean and efficient implementation of the Python 3 programming language, optimized to run on microcontrollers and in constrained environments. The project was created by Damien George and first released publicly in 2014, following a successful Kickstarter campaign. It brings the high-level, readable syntax of Python to embedded systems, enabling rapid development for the Internet of Things, robotics, and educational electronics.

Overview

MicroPython is designed to be compatible with standard Python, implementing a significant subset of the Python syntax and semantics. It runs on a wide range of hardware, from simple 32-bit ARM-based microcontrollers like those from STMicroelectronics and NXP Semiconductors to more powerful systems like the Raspberry Pi single-board computer. The core interpreter is written in C and is highly portable, allowing it to be compiled for new architectures with relative ease. Its small memory footprint, often requiring just 256k of flash memory and 16k of RAM, makes it suitable for resource-limited devices that traditionally used lower-level languages like C or Assembly language.

Features

Key features include an interactive REPL accessible via serial communication, which allows for immediate code execution and debugging over a UART connection. It provides core Python standard library modules such as `os`, `sys`, and `time`, along with hardware-specific libraries for controlling GPIO, ADC, PWM, and I²C and SPI buses. The system supports asynchronous I/O via `asyncio` for efficient handling of concurrent tasks. While it does not support the full standard library, it includes optimized modules like `micropython` for accessing low-level functions and can be extended with Frozen modules to save RAM.

Implementation

The implementation consists of a compact Virtual machine that executes bytecode compiled from Python source. The Compiler and Runtime system are designed for minimal Dynamic memory allocation to reduce Heap fragmentation. It includes a custom garbage collector and often runs without an underlying Operating system, directly on the "bare metal" of the microcontroller. Ports exist for numerous microcontroller families, including the ESP32 and ESP8266 by Espressif Systems, the STM32 series from STMicroelectronics, and the RP2040 from the Raspberry Pi Foundation. The build system uses make and relies on GCC or Clang for cross-compilation to ARM Cortex-M or Xtensa processor cores.

Development and Community

Primary development is led by Damien George, with significant contributions from a global open-source community hosted on GitHub. The project is licensed under the permissive MIT License, encouraging commercial and academic adoption. Development discussions occur on the official forum and through GitHub Issues. Major milestones have included the addition of WebAssembly support for running in browsers, the creation of the related CircuitPython fork by Adafruit Industries focused on education, and the establishment of the MicroPython Software Foundation to steward the project. Regular contributions also come from companies like Pycom and BBC (with the BBC micro:bit board).

Applications

MicroPython is extensively used in prototyping and deploying Internet of Things devices, from environmental sensors to smart home gadgets. It is the default programming environment for the educational BBC micro:bit and is popular on development boards like the Pyboard, NodeMCU, and Wemos D1. Applications span Home automation with MQTT, scientific data logging, Robotics controllers, and interactive art installations. Its ease of use has made it a staple in Maker culture communities, featured in projects at events like Maker Faire, and it is increasingly used in industrial settings for rapid proof-of-concept development.

Category:Free software programmed in C Category:Embedded systems Category:Python (programming language) implementations Category:Programming languages created in 2014