PROVIDER - plug-and-play Python for education hardware

CircuitPython

CircuitPython forked from MicroPython in 2017 to make boards mount as a USB drive with editable code.py and native USB HID, backed by more than 300 supported boards and a versioned library bundle; the trade-off is performance, memory and partial advanced peripheral support.

Programming Languages & Frameworks United States 2026.11.19
3.6pts

Detailed Notes

Pros 5 items

Forked from MicroPython by Adafruit in 2017 to optimise for education and a plug-it-in-and-edit workflow
Boards mount as a USB drive, so saving 1 code.py file restarts the program instantly without any toolchain
Built-in USB HID support turns a board into 4 device classes: keyboard, mouse, gamepad or MIDI
Official firmware supports more than 300 boards with a single versioned library bundle
Everything is open source, and .py libraries work by copying 1 folder into lib, which keeps teaching and extension simple

Cons 4 items

Ease of use costs performance and memory, with heavier GC and filesystem overhead triggering memory errors sooner
The fork diverged from MicroPython, so APIs differ and porting between ecosystems requires changes
Advanced peripherals such as CAN, USB Host and deep sleep are only partially supported
Production deployments must disable USB mass storage and auto-reload, moving closer to traditional firmware work

Service Overview

CircuitPython was forked from MicroPython by Adafruit in 2017 with a different priority: make "plug it in and edit" as frictionless as possible. A board appears as a USB drive containing code.py, and saving the file restarts the program automatically.

In the languages and frameworks category it is the education-first hardware Python route: native USB HID, one versioned library bundle and more than 300 supported boards let people with no toolchain experience move hardware within minutes.

Key Strengths

  • No toolchain: edit code.py in any text editor, which is the fastest possible on-ramp for students
  • Native USB HID: boards act as keyboards, mice, gamepads or MIDI devices without extra libraries
  • Versioned library bundle: drop the matching bundle into lib and dependencies are resolved by convention
  • Broad board coverage: official firmware spans more than 300 boards including ESP32-S2/S3, RP2040, nRF52 and SAMD
  • Readable errors: syntax and runtime errors print to the serial console and are easy to explain in class

Product Ecosystem

Firmware and boards

circuitpython.org/downloads lists every supported board grouped by chip family.

Libraries

Adafruit maintains the CircuitPython bundle covering sensors, displays, motors and networking, released per version.

Tooling

Mu Editor, Thonny and VS Code extensions handle serial and file sync; circup updates libraries in bulk.

Limitations

  • Heavier runtime than MicroPython, so complex logic hits MemoryError sooner
  • API drift after the fork means libraries are not interchangeable between the two ecosystems
  • Advanced peripherals such as CAN, USB Host and deep sleep push projects back to C or MicroPython
  • Production configuration requires disabling USB writes and auto-reload to behave like conventional firmware

Use Cases

  • Teaching and maker workshops (★★★★★): plug in and go without environment setup
  • Fast hardware prototypes (★★★★): tiny scripts for sensors and displays
  • USB HID gadgets (★★★★): turn a board into a keyboard or controller
  • Volume production and hard real-time (★★): prefer C, C++ or Rust

Pricing

Item Price Notes
CircuitPython firmware $0 Open source under MIT, free to use
Development boards Per model Official Adafruit boards cost more than compatible ones
Library bundle $0 Official and community libraries are open source

Cost sits in hardware; for teaching, choose an entry board with USB and a few onboard sensors.

FAQ

  • CircuitPython or MicroPython? Choose CircuitPython for teaching, fast prototypes and USB-drive updates; choose MicroPython for broader module coverage and better performance.
  • Why does my board raise MemoryError? Usually too many imports or a large buffer; trim libraries, use displayio chunked refresh, or move to a board with more RAM.
  • Does it support Wi-Fi? Yes, on boards such as ESP32-S2/S3 and Pico W through the wifi and socketpool modules. Networking projects can compare MicroPython under languages and frameworks.

Code Examples

code.py: onboard LED with a button

import board, digitalio, time

led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT
button = digitalio.DigitalInOut(board.BUTTON)
button.switch_to_input(pull=digitalio.Pull.DOWN)

while True:
    led.value = button.value
    time.sleep(0.05)

The board module maps pin names per board, so porting usually touches only this line.

Acting as a USB HID keyboard

import time
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode

kbd = Keyboard(usb_hid.devices)
time.sleep(1)
kbd.send(Keycode.CONTROL, Keycode.ALT, Keycode.DELETE)

Plugged into a computer, the board enumerates as a keyboard device.

Community & Resources

Visit CircuitPython Website → https://circuitpython.org/
Visit Website ↗