MicroPython + CircuitPython
On this episode, we welcome back Damien George from MicroPython along with Scott Shawcroft from CircuitPython and Adafruit. We'll talk about how these two frameworks are solving similar problems with slightly different philosophies. More importantly, they are working closely to bring MicroPython and CircuitPython more in sync.
Episode Deep Dive
Guests Introduction and Background
Damien George is the creator of MicroPython. He began his career as a theoretical physicist, researching particle physics and cosmology. All the while, he maintained a side interest in microcontrollers and robotics. That fascination led him to launch MicroPython in 2013 via Kickstarter, and he’s been driving its development ever since.
Scott Shawcroft is a software engineer at Adafruit and the primary maintainer of CircuitPython. He came from a web-development and C-based microcontrollers background, eventually finding Python early on and sticking with it throughout his career. Scott focuses on creating a beginner-friendly experience so that hobbyists, students, and developers of all backgrounds can more easily build embedded projects with Python.
What to Know If You’re New to Python
If you’re just getting started, here are a few quick points to help you follow along with this episode’s deeper topics:
- Basic Python Syntax: Be comfortable with Python’s core constructs: loops, functions, modules, and packages.
- Working with Files: Understanding how to save and manage .py (Python) files will help you transfer code onto hardware boards.
- Package Ecosystem: Familiarize yourself with tools like
pip
orconda
so you can install packages locally or check out libraries that might parallel what’s in MicroPython or CircuitPython.
Key Points and Takeaways
Microcontrollers vs. Traditional Computers
Microcontrollers are single-purpose systems-on-a-chip (SoC) that manage real-time interactions with hardware (e.g., sensors, lights, motors). Traditional computers like Raspberry Pi or laptops are general-purpose, often run full operating systems, and typically handle many processes at once. Embedded devices offer a much thinner software stack, meaning the user’s code (often in MicroPython or CircuitPython) interacts closely with hardware at low-level. This is very different from desktop or web programming but is surprisingly approachable in Python.- Links / Tools:
MicroPython vs. CircuitPython
Both projects bring Python to constrained embedded devices, but they differ in focus and philosophy. MicroPython targets a professional production environment, making it suitable for commercial products with an emphasis on code coverage and stability. CircuitPython is tailored for beginners and hobbyists, providing a friendly on-ramp with consistent APIs across Adafruit hardware, plus an auto-reload workflow over USB drives.- Links / Tools:
USB Drive Workflow in CircuitPython
CircuitPython boards typically show up as a USB drive namedCIRCUITPY
, where you can simply drag and drop yourcode.py
file. On save, the device reboots automatically to run the new code. This speeds up experimentation and is especially beginner-friendly, removing the overhead of installing specialized programming toolchains.- Links / Tools:
Professional Use Cases for MicroPython
When a company wants to ship a product powered by a microcontroller and Python, MicroPython often gets chosen for its memory efficiency, stable release cycles, and the ability to “freeze” Python code into the firmware. This includes everything from controlling coffee machines and factory robots to running advanced sensors with deterministic timing.- Links / Tools:
Asyncio on Microcontrollers
One modern Python feature that translates surprisingly well to embedded use isasync
/await
. Because many microcontroller tasks involve waiting for events or sensor input, asynchronous programming is a clean approach to handle concurrency. MicroPython’sasyncio
is well suited for real-time tasks like Bluetooth data handling or responding to pin changes while other code runs in the background.- Links / Tools:
- MicroPython asyncio docs (search for “asyncio” section)
- Links / Tools:
Collaboration and Convergence
MicroPython and CircuitPython are separate codebases but share a core foundation. They’ve been working on keeping their forks closer together, so contributions from each side can be merged more seamlessly. This includes efforts to backport bug fixes, features like tab completion in the REPL, and performance optimizations into the shared VM core.- Links / Tools:
Development Workflow Tools: MP Remote
On the MicroPython side,mpremote
(introduced in recent versions) is a key tool for file transfers, an interactive REPL, and advanced features like mounting your local file system on the microcontroller. This streamlines testing, development, and deployment workflows without a complicated toolchain.- Links / Tools:
Adafruit Ecosystem and Learning Resources
Adafruit invests heavily in guides and tutorials, providing an easy path for educators, hobbyists, and engineers. If you want to build a wearable LED costume or a school science project, you’ll typically find ready-made code and hardware suggestions. This approachable approach is central to CircuitPython’s philosophy.- Links / Tools:
Choosing the Right Board
There’s no universal “best board,” but it’s crucial to match the hardware’s feature set (Wi-Fi, BLE, or extra I/O pins) to your project. Boards like the Adafruit Feather series, Raspberry Pi Pico with RP2040, or the original PyBoard each have strengths. Identify your must-have features—like real-time I/O or wireless connectivity—then pick the matching board.- Links / Tools:
Futures of Python on Embedded Devices
The Python ecosystem is seeing interest in performance improvements (e.g. CPython 3.11’s speed ups, PyPy, or even specialized forks like Cinder). While these changes focus on desktop/server usage, the community’s energy and investment in Python as a language indirectly boost projects like MicroPython and CircuitPython. Over time, new language features may trickle down, further expanding Python’s presence in the embedded space.
Interesting Quotes and Stories
“I always had microcontrollers on my desk... half-built robots. Eventually, that turned into MicroPython.” – Damien George
“We designed CircuitPython to get you from zero to blinking lights in the shortest time possible. That’s key for beginners.” – Scott Shawcroft
These quotes highlight the personal journeys each guest took to bring Python to embedded systems and illustrate their shared passion for making hardware projects more accessible.
Key Definitions and Terms
- Microcontroller: A compact integrated circuit that manages a specific task using limited memory and I/O (e.g., in cars, toasters, robots).
- MicroPython: A lean implementation of Python designed for microcontrollers.
- CircuitPython: A beginner-focused fork of MicroPython championed by Adafruit, adding user-friendly workflows and consistent hardware APIs.
- REPL: A “read-eval-print loop,” an interactive programming environment for typing Python code directly and seeing immediate results.
- Asyncio: A Python library for writing concurrent code using the
async
andawait
keywords, well-suited to waiting on I/O events.
Learning Resources
Here are a few ways to deepen your Python skills, especially if you want to move from beginner to advanced concepts:
- Python for Absolute Beginners: A perfect place to build a solid foundation before exploring MicroPython or CircuitPython.
- MicroPython Documentation
- CircuitPython Tutorials
Overall Takeaway
MicroPython and CircuitPython have opened up embedded programming to a vastly broader audience by lowering the technical hurdles associated with microcontrollers. They bring the power and readability of Python to hardware traditionally dominated by C or Assembly. With MicroPython, product-focused engineers can rely on stability and rigorous coverage, while CircuitPython’s USB-drive workflow and curated libraries attract beginners and educators. The end result is a thriving embedded Python ecosystem with a bright future, blending professional-grade robustness and ease-of-use in equal measure.
Links from the show
Damien's Site: dpgeorge.net
CircuitPython: circuitpython.org
MicroPython: micropython.org
Upstream MicroPython Versions Merged Into CircuitPython: adafruitdaily.com
Boards (MicroPython): store.micropython.org
Boards (CircuitPython): adafruit.com
MicroPython Forums: forum.micropython.org
Become a sponsor to MicroPython: github.com
Adafruit Discord: adafru.it
Download CircuitPython: circuitpython.org
CircuitPython Source: github.com
Scott's Live Stream: youtube.com
Watch this Recording: youtube.com
Episode transcripts: talkpython.fm
--- Stay in touch with us ---
Subscribe to Talk Python on YouTube: youtube.com
Talk Python on Bluesky: @talkpython.fm at bsky.app
Talk Python on Mastodon: talkpython
Michael on Bluesky: @mkennedy.codes at bsky.app
Michael on Mastodon: mkennedy