CircuitPython Documentation
repository·main·Indexed 26 days ago
https://github.com/adafruit/circuitpythonA beginner-friendly, open-source version of Python optimized for microcontrollers, focusing on ease of use via USB/BLE connectivity. This documentation covers building the firmware, using the mpy-cross compiler to generate .mpy bytecode, and port-specific instructions for hardware such as the AD-APARD32690-SL, Spresense (CXD56), and NXP i.MX RT10xx series. It also includes details on libraries like AnimatedGIF and littlefs.
What's inside CircuitPython
- MEMZIP is a simple, read-only filesystem that takes a ZIP file comprised of uncompressed files and presents it as a filesystem. This allows Python files contained within the ZIP to be imported directly.
Overview of AD-APARD32690-SL
mainThe AD-APARD32690-SL is a CircuitPython port for a board featuring the MAX32690, a dual-core ARM Cortex-M4/RISC-V MCU with 3MiB Flash and 1MiB SRAM.
Hardware Features:
- Form-factor similar to Arduino Mega (supports Arduino-style shields).
- Two Pmod connectors: P8 (SPI) and P13 (I2C).
- Supports 10BASE-T1L Ethernet, Wifi, Bluetooth, USB, and Security via MAXQ1065.
Current CircuitPython Limitations:
- Most advanced features (Ethernet, Wifi, Bluetooth, Security) are not yet available.
- USB support is planned for a future update; other features are currently unplanned.
Overview of Makerdiary M60 Keyboard
mainThe Makerdiary M60 is a modular, hot-swappable 60% keyboard that supports both USB and Bluetooth Low Energy (BLE) connectivity. It is powered by Python (CircuitPython), allowing for programmable keyboard functionality.Overview of Makerdiary nRF52840 Connect Kit
mainThe Makerdiary nRF52840 Connect Kit is an open-source prototyping kit based on the nRF52840 SoC. It supports various wireless protocols including Bluetooth LE, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT, and 2.4 GHz proprietary stacks.
Key hardware features include:
- Peripherals: USB 2.0, NFC-A, GPIO, UART, SPI, TWI, PDM, I2S, QSPI, PWM, ADC, and QDEC.
- GPIO: Up to 32 multi-function GPIO pins (7 of which support ADC).
- Storage/Display: External 64 Mbit QSPI flash and an RGB LED.
- Connectivity: USB-C interface, Chip antenna or U.FL receptacle options, and a Serial Wire Debug (SWD) port.
- Power: Flexible management for USB-C, external supplies, or batteries.
Overview of the littlefs library
mainThelittlefslibrary is a filesystem implementation used within CircuitPython. The upstream source for this library is the official littlefs project: https://github.com/littlefs-project/littlefs.Overview of the AnimatedGIF library
mainTheAnimatedGIFlibrary for CircuitPython is a port of the AnimatedGIF Arduino GIF decoder originally created by Larry Bank. It has been modified for use in CircuitPython by Mark Komus. This library allows CircuitPython devices to decode and play animated GIF files.Overview of Electronic Cats BastBLE
mainThe Electronic Cats BastBLE is a development board based on the Nordic nRF 52840 microcontroller featuring a Cortex M4F processor. It includes external memory via QSPI flash.Overview of Makerdiary iMX RT1011 Nano Kit hardware
mainThe Makerdiary iMX RT1011 Nano Kit is a prototyping kit based on the NXP iMX RT1011 Crossover MCU (Arm Cortex-M7 core, up to 500 MHz).
Key Hardware Features:
- Memory: 128 KB on-chip RAM (configurable as TCM or general-purpose) and external 128 Mbit QSPI flash with XIP support.
- Peripherals: High speed USB, UART, SPI, I2C, SAI, PWM, GPIO, ADC, etc.
- I/O: Dual-row 40 pins (DIP/SMT type) providing up to 33 multi-function GPIO pins (including 15 configurable ADC inputs).
- Connectivity: USB-C and Serial Wire Debug (SWD) port.
- User Interface: Programmable LED and Button.
Overview of Makerdiary nRF52840 M.2 Developer Kit
mainThe Makerdiary nRF52840 M.2 Developer Kit is an IoT prototyping platform consisting of an nRF52840 M.2 Module and an M.2 Dock. It is designed for prototyping IoT products with a path to scale to production by using the nRF52840 M.2 Module with custom PCB hardware.
For hardware-specific details, refer to the official Makerdiary repository: https://github.com/makerdiary/nrf52840-m2-devkit
Understand Core Module availability in CircuitPython
mainCircuitPython core modules are designed to be consistent across different ports and boards. However, a module may be missing from a specific board if:
- The underlying hardware does not support the feature (e.g., a microcontroller without analog features will not have
analogio). - Flash memory space is too limited to include the module.
To verify if a specific module is available on your hardware, consult the
support_matrixdocumentation.- The underlying hardware does not support the feature (e.g., a microcontroller without analog features will not have
Support status for Espressif SoCs
mainThe Espressif port supports various SoCs with different stability levels:
SoC Status ESP32 beta ESP32-H2 alpha ESP32-C2 alpha ESP32-C3 beta ESP32-C6 alpha ESP32-P4 alpha ESP32-S2 stable ESP32-S3 stable Hardware constraints for Arduino Nano 33 BLE and BLE Sense
mainThe Arduino Nano 33 BLE and Nano 33 BLE Sense do not have QSPI external flash. All Python code and files must be stored on the internal flash filesystem.