Pybricks: MicroPython for LEGO
Posted: Fri Jun 19, 2020 10:40 am
Hi everyone - we're excited to finally share with you a whole new family of MicroPython ports: Pybricks.
Pybricks brings MicroPython to all LEGO smart devices that support firmware updates. Now people can program their LEGO creations with MicroPython and make them autonomous, whether it's MINDSTORMS robots, smart trains, autonomous Technic excavators, or your own custom builds.
We have working MicroPython ports for almost all upgradeable LEGO hubs. Some of them are already stable, others are still in progress.
- LEGO MINDSTORMS EV3 (Unix). Stable. LEGO uses this as the official EV3 MicroPython.
- LEGO Control+ (STM32L431). Currently in beta.
- LEGO City Hub (STM32F030RC): Currently in alpha.
- LEGO Move Hub (STM32F070RB): Currently in alpha.
- LEGO SPIKE Prime Hub (STM32F413VG): Currently in alpha.
See also our development roadmap.
Users can install the firmware and run scripts with our online app, Pybricks Code. The end-user API can be found here. We are also working on a Python library and utility that lets you interface with Pybricks hubs while offline.
In terms of the overall direction of the project, it is worth noting that our core audience is perhaps a bit different from the average MicroPython user. We try to keep everything very beginner-friendly: for many of our users, this is their very first text-based programming experience. And for the most part, they will not be using custom electronics, just LEGO motors and sensors. Finally, due to flash space constraints, not all MicroPython features can be enabled.
Still, we try to make it fun for seasoned MicroPython developers as well, and this side of the project will probably grow over time.
Our source code is MIT licensed. It's available on our GitHub. We include MicroPython a submodule, with a handful of patches for which we usually ultimately create PRs upstream. Quite a few of our contributions have been merged this way already.
We aim to keep contributing to upstream MicroPython going forward. We would like to take this opportunity to thank the whole MicroPython community for making this possible.
We're happy to answer any questions in this topic, but we also welcome generic discussion and specific questions at our issue tracker. We look forward to hearing what you think!
Pybricks brings MicroPython to all LEGO smart devices that support firmware updates. Now people can program their LEGO creations with MicroPython and make them autonomous, whether it's MINDSTORMS robots, smart trains, autonomous Technic excavators, or your own custom builds.
We have working MicroPython ports for almost all upgradeable LEGO hubs. Some of them are already stable, others are still in progress.
- LEGO MINDSTORMS EV3 (Unix). Stable. LEGO uses this as the official EV3 MicroPython.
- LEGO Control+ (STM32L431). Currently in beta.
- LEGO City Hub (STM32F030RC): Currently in alpha.
- LEGO Move Hub (STM32F070RB): Currently in alpha.
- LEGO SPIKE Prime Hub (STM32F413VG): Currently in alpha.
See also our development roadmap.
Users can install the firmware and run scripts with our online app, Pybricks Code. The end-user API can be found here. We are also working on a Python library and utility that lets you interface with Pybricks hubs while offline.
In terms of the overall direction of the project, it is worth noting that our core audience is perhaps a bit different from the average MicroPython user. We try to keep everything very beginner-friendly: for many of our users, this is their very first text-based programming experience. And for the most part, they will not be using custom electronics, just LEGO motors and sensors. Finally, due to flash space constraints, not all MicroPython features can be enabled.
Still, we try to make it fun for seasoned MicroPython developers as well, and this side of the project will probably grow over time.
Our source code is MIT licensed. It's available on our GitHub. We include MicroPython a submodule, with a handful of patches for which we usually ultimately create PRs upstream. Quite a few of our contributions have been merged this way already.
We aim to keep contributing to upstream MicroPython going forward. We would like to take this opportunity to thank the whole MicroPython community for making this possible.
We're happy to answer any questions in this topic, but we also welcome generic discussion and specific questions at our issue tracker. We look forward to hearing what you think!