This is a quick tutorial for using Pybricks Python in LEGO robotics Competitions such as FIRST LEGO League and World Robot Olympiad.
About the author
My name is Attila Farago, I have been working in the software development industry for 20+ years and have engaged with LEGO robotics for the past 10 years both in the coach and the judge roles in FIRST LEGO League and World Robot Olympiad as well.
I am enthusiastic about helping individuals and teams to grow to their best and also learn from many experts all over the world. For me, learning, networking, and helping develop others are worth much more than winning.
You can check out my other hobby projects on my personal page and my professional background.
About this tutorial
In the next sections, you will get a hands-on tutorial to help you get started with Pybricks which in my experience is the best and most effective way to program your LEGO hub.
This tutorial focuses on specific competition aspects, while the authors of Pybricks are creating a tutorial on the site itself. I strongly recommend reading the official tutorial as well.
Let’s start
Let us begin the learning and create a joyful experience with consistent robot runs where you can focus on strategy!
Pssst: multivitamin at your hands - BlocklyPy
Before you leave, just remember this website that I created to read and translate most of the known LEGO EV and newer robotics software platforms.
Just open the file, review the pseudocode, the block graphics preview and an automatic Pybricks Python translation.
SPIKE Prime (45678) and SPIKE Essentials (45345) kit and Robot Inventor (51515) kit for word-blocks and icon-blocks transformation.
- SPIKE v2 (.llsp) files.
- SPIKE v3 (.llsp3) files.
- Robot Inventor files (.lms).
EV3 Mindstorms kit (31313) LabView EV3-G code transformation.
- EV3Classroom files (.lmsp).
- EV3 Lab (.ev3) files.
- EV3 Lab Compiled Binary (.rbf) files.
If you are a developer you can also build your own app leveraging the read and translate capabilities of BlocklyPy npm package library.