LLMpediaThe first transparent, open encyclopedia generated by LLMs

CircuitPython

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 58 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted58
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
CircuitPython
NameCircuitPython
DeveloperAdafruit Industries
Released17 July 2017
Latest release version9.1.0
Latest release date15 October 2024
Programming languageC, Python
Operating systemMicrocontroller-based
GenreEmbedded Python implementation
LicenseMIT License
Websitehttps://circuitpython.org/

CircuitPython is a beginner-friendly, open-source derivative of MicroPython designed specifically for programming microcontrollers and single-board computers. Developed and maintained by Adafruit Industries, it emphasizes ease of use, a shallow learning curve, and extensive hardware support. The project is built on the CPython interpreter and is distributed under a permissive MIT License, fostering widespread adoption in education and hobbyist electronics.

Overview

CircuitPython provides a full Python 3 implementation that runs on low-cost, low-power microcontroller boards, enabling users to control hardware with simple code. It is distinguished by its "plug-and-play" experience, where a connected board appears as a USB drive, allowing for direct editing of code files. The interpreter and core libraries are written primarily in C, optimized for constrained environments common in devices like those based on the ARM Cortex-M architecture. This approach makes it an accessible gateway to physical computing and the Internet of Things.

History and development

The project was forked from MicroPython in 2017 by Adafruit Industries, led by Scott Shawcroft and other key contributors from the maker community. The primary motivation was to create a version more focused on education and simplicity, stripping away advanced features like REPL-only modes to prioritize a consistent user experience. Major development milestones have included expanding the supported microcontroller families, such as those from Espressif Systems and Raspberry Pi Ltd., and achieving significant performance improvements. Its evolution is closely tied to the growth of the Maker movement and initiatives like those promoted by the Python Software Foundation.

Features and capabilities

Key features include a robust set of built-in modules for hardware interaction, such as `digitalio`, `analogio`, and `busio` for managing GPIO, ADC inputs, and communication protocols like I²C and SPI. It supports a wide array of device drivers and sensors through the extensive Adafruit CircuitPython Library Bundle. The runtime provides native support for common tasks including Pulse-width modulation, neopixel LED control, and audio playback. Unlike some embedded environments, it includes a full Python standard library subset, enabling file I/O operations and basic data structure manipulation directly on the device.

Hardware support

CircuitPython officially supports a vast and growing list of microcontroller boards, predominantly those based on chips from Microchip (ATSAMD21, ATSAMD51), Nordic Semiconductor (nRF52840), Espressif Systems (ESP32-S2, ESP32-S3), and Raspberry Pi Ltd. (RP2040). Many supported boards are produced by Adafruit Industries itself, such as the Feather M4 Express and Circuit Playground Express, but it also runs on hardware from partners like Arduino (Arduino Nano RP2040 Connect) and Pimoroni. The project maintains detailed board definitions in its repository to ensure compatibility with peripherals like TFT displays and SD card readers.

Comparison with MicroPython

While both are implementations of Python for microcontrollers, CircuitPython diverges by removing support for Linux-based single-board computers like the Raspberry Pi, focusing solely on microcontrollers. It offers a more curated and consistent API, often at the expense of some advanced features and raw performance found in the upstream MicroPython project. The development philosophy differs significantly, with CircuitPython prioritizing user experience and hardware driver completeness, whereas MicroPython maintains a broader scope that includes real-time operating system integration and bare-metal programming flexibility.

Community and resources

A vibrant, open community centered around Adafruit Industries drives the project, with active forums, extensive documentation on Read the Docs, and regular contributions on GitHub. Educational resources are plentiful, including guides on Adafruit Learning System, tutorials from Instructables, and content presented at events like Maker Faire. The project also benefits from collaborations with organizations such as the MicroPython team and funding from platforms like GitHub Sponsors. This ecosystem ensures strong support for newcomers and continuous development of libraries for new sensors and breakout boards.

Category:Free software programmed in C Category:Free software programmed in Python Category:Python (programming language) implementations Category:Embedded systems