Watch the associated video here:

Pybricks is opensource firmware for the discontinued Lego Mindstorms hubs.

Pybricks: Unlocking the Full Potential of LEGO Mindstorms

LEGO Mindstorms has been a popular and versatile robotics platform for more than two decades. With the rise of the Python programming language and the growing demand for more flexible and powerful tools, Pybricks emerges as an ideal solution for LEGO Mindstorms enthusiasts. In this article, we’ll introduce you to Pybricks, discuss its key features, and explain how it can enhance your LEGO Mindstorms experience.

What is Pybricks?

Pybricks is an open-source firmware designed for LEGO Mindstorms and other compatible LEGO hardware like EV3, Powered Up, and SPIKE Prime. The primary goal of Pybricks is to provide a more powerful programming environment using the popular Python programming language. With Pybricks, users can unlock the full potential of their LEGO creations, enjoying greater flexibility and customization options.

Key Features of Pybricks

Python programming language: Pybricks allows users to program their LEGO Mindstorms robots using Python, a versatile and widely-used programming language. Python offers a more intuitive syntax, making it easier to learn and understand for both beginners and advanced users.

Improved sensor and motor control: Pybricks provides more precise control over sensors and motors, enabling users to create more sophisticated and accurate robotic systems.

Flexibility and customization: Pybricks enables users to customize their code and integrate it with third-party sensors and hardware, expanding the possibilities of their LEGO creations.

Active community and support: Pybricks boasts a dedicated and active community that provides support, shares knowledge, and contributes to the ongoing development of the platform.

Getting Started with Pybricks

Setting up Pybricks on your computer and LEGO hardware is a straightforward process. Start by visiting the Pybricks website, where you’ll find the necessary tools and resources to install the Pybricks firmware on your LEGO hardware. Once the firmware is installed, you can connect your hardware to your computer and start programming with Pybricks directly from your browser.


Pybricks offers a refreshing take on LEGO Mindstorms programming, providing users with the power and flexibility of Python. Whether you’re a beginner looking to get started with robotics or an experienced user seeking more advanced functionality, Pybricks is an excellent choice. Give Pybricks a try and unlock the full potential of your LEGO Mindstorms creations!

Bonus - Self Balancing Robot

Self Balancing Robot

One of the funniest things you can create with the Lego Inventor kit is a self balancing robot. It utilises the hubs built-in IMU.


Plug the:

  • left motor cable in to port C
  • right motor into port D
  • color Sensor into port A


Here is the code:

Did you find this content useful?

If you found this high quality content useful please consider supporting my work, so I can continue to create more content for you.

I give away all my content for free: Weekly video content on YouTube, 3d Printable designs, Programs and Code, Reviews and Project write-ups, but 98% of visitors don't give back, they simply read/watch, download and go. If everyone who reads or watches my content, who likes it, helps fund it just a little, my future would be more secure for years to come. A price of a cup of coffee is all I ask.

There are a couple of ways you can support my work financially:

If you can't afford to provide any financial support, you can also help me grow my influence by doing the following:

Thank you again for your support and helping me grow my hobby into a business I can sustain.
- Kevin McAleer