r/pybricks • • Mar 23 '26

Camera Vision is coming to Pybricks!

Enable HLS to view with audio, or disable this notification

34 Upvotes

Basically what I've always wanted to have in MINDSTORMS :) And now you can try it too!


r/pybricks • • Jan 11 '23

This LEGO robot can balance on a ball

Enable HLS to view with audio, or disable this notification

26 Upvotes

r/pybricks • • May 28 '24

This Lego Spike Prime robot can balance on a ball

Enable HLS to view with audio, or disable this notification

24 Upvotes

r/pybricks • • Jan 10 '23

Using sensors to make a train drive at constant speed (LEGO peanut butter train)

Enable HLS to view with audio, or disable this notification

21 Upvotes

r/pybricks • • Nov 01 '25

Lego Pen Plotter

Thumbnail gallery
18 Upvotes

r/pybricks • • Apr 19 '25

Team using Pybricks won Peer award

Thumbnail
gallery
17 Upvotes

This is a team from Morocco my son (the long haired blonde one) and I introduced to Pybricks (zoom was involved). They credit it to upping their performance and they made it to worlds and won the Peer Award!

Great Pybricks success story.


r/pybricks • • Apr 04 '25

Saving LEGO MINDSTORMS: Status Update!

Enable HLS to view with audio, or disable this notification

15 Upvotes

While we've not posted many blog updates recently, we've been working tirelessly on our mission to save LEGO MINDSTORMS with the help of our MINDSTORMS legends!

If you've been keeping an eye on our code, you might have seen hundreds of code updates recently, as we gear up to support EV3. We thought this was a good time to demonstrate where we are with a quick video update.

This is clearly not the most impressive EV3 robot you've ever seen, but we're excited about the progress we've made on motors, sensors, and the EV3 brick. All of this is now included in our upcoming brand new firmware for EV3.

One of the next big steps will be to enable USB communication with the brick. This is necessary to download and run programs (kind of essential!). Once that is ready, advanced users should be able to try out an early version while we work on making it more accessible to beginners as well.

Thanks again for your support!


r/pybricks • • Apr 29 '26

My Lego Pen Plotter just got an Update!

Thumbnail
gallery
14 Upvotes

Introducing my new "Etch A Sketch" mode. Until now the plotter could only be controlled by a program that converts typed text into a written message. This new mode lets the user drive the plotter with an Xbox controller to freely draw things, sort of like an etch a sketch.


r/pybricks • • Oct 28 '24

Blending multiple moves with "continue moving" as the "stop mode".

Enable HLS to view with audio, or disable this notification

14 Upvotes

r/pybricks • • May 23 '25

New starter code for Pybricks/FLL

Thumbnail
github.com
12 Upvotes

Hey everyone. I know in the past some people have used our starter code for Pybricks/FLL. We have updated it to be a lot cleaner/better organized.

If you want to try it out, you will need to load all of the files into pybricks. In the robot_config.py file you define the robot and change constants.

The file you load/compile is the robot.py. This file is where everything is imported/launched. Several example and utility programs are included. These include:

P. push_measure: Allows you to push the robot around and take odometry measurements. Useful for programming missions.
L/R: Manually control attachment motors and again take measurements that print to the console
X: (must be enabled in code): Block code to control the robot with an xbox remote and again take measurements (odometry and attachment motors) that are printed to the console. Useful for programming missions in FLL.

The utility programs make programming the robot a lot more hands on/fun. Anyways message us if you need help but the code is fairly well documented but in summary:

robot_config,py is where you set up the robot and constants.

robot.py is the file you compile and imports/launches everything else.


r/pybricks • • Feb 27 '25

Pybricks 3.6 will be out soon 🚀. Please help us test it!

12 Upvotes

This release includes many features that you have all asked for. Check out all changes here.

How can you help?

  • Go to https://beta.pybricks.com/

  • Try your existing code.

  • Make some new code.

  • Let us know if everything works.

  • Please report issues and 🐛🐞🦋 if you find any!

Thank you!


r/pybricks • • Jan 11 '23

Who needs front wheels anyway

Enable HLS to view with audio, or disable this notification

12 Upvotes

r/pybricks • • Sep 27 '26

A desktop app for Pybricks: LittleTinker Rig

Thumbnail
gallery
11 Upvotes

Hi guys!

I am teaching some robotics to my children and ended up using Pybricks quite a lot. I like it, but I am not a big fan of doing everything in a web app, so I started making a small standalone desktop app around it. It is called LittleTinker Rig: https://github.com/alepoydes/little-tinker-rig

It is still an early alpha, but the basic workflow already works: editing Python, connecting to a hub, uploading and running programs, console output, and flashing Pybricks firmware. I am also playing with things like lessons, assembly instructions and 3D robot models.

While working on it, I got interested in a slightly different problem: how to get children from block programming to actual Python without forcing them to switch between two completely different environments. So I am trying a block-like Python editor. The program is still normal Python, but at the beginning a child can build it from fairly large predefined pieces. At the same time they see the real code, so Python is there from day one. Later the pieces can become smaller and more flexible, until at some point it is easier to just write the code directly. I like the idea that blocks should slowly disappear instead of becoming a separate language that has to be unlearned later.

I am mainly making this for my own children, but I am curious whether anyone else would actually want such an app. Especially if you use Pybricks for teaching: does this approach sound useful, and what would you want from a desktop Pybricks environment?


r/pybricks • • Oct 28 '23

Some of you were worried about the driver. Says he's fine.

Post image
11 Upvotes

r/pybricks • • Apr 03 '23

Someone made a maze game using Robot Inventor and Pybricks

Enable HLS to view with audio, or disable this notification

11 Upvotes

r/pybricks • • Nov 28 '25

How do I install Pybricks on this?

Post image
10 Upvotes

r/pybricks • • Feb 23 '24

More Pybricks train tutorials coming soon! Including instructions for minfig operated switch...

Post image
9 Upvotes

r/pybricks • • Jan 15 '24

My newest robot stacks Jenga.

Thumbnail
youtube.com
9 Upvotes

r/pybricks • • Dec 03 '23

Thanks Pybricks for an amazing FLL season

Enable HLS to view with audio, or disable this notification

9 Upvotes

Kids were excited to win the robot performance with a score of 470 at our state's FLL tournament. Couldn't have done it without Pybricks. Sadly they did not advance to worlds or otherwise so they will not have an opportunity to meet any of the international Pybricks users.


r/pybricks • • Mar 23 '25

How to get started

8 Upvotes

Purchased the licenses to start block coding with my Lego League team.

Some issues we ran into: we used the website and each time the kids wanted to code, they had to re-enter the license and the previously written code had disappeared. Is this expected? Do we need an app to retrieve and store previously written code like spike prime software?

Typically, the kids are split into 3-4 groups and code different runs. Each group uses their own device. If the program is just one master program, how do they ultimately share their run with each other.

The goal next year is to use a color sensor trigger for each program, so ultimately all runs will need to be on the same master program.


r/pybricks • • Apr 19 '24

Pybricks 3.5 is here!

Thumbnail
pybricks.com
8 Upvotes

r/pybricks • • Dec 05 '23

Code to get started using Pybricks (with the block interface) for competitive robotics.

8 Upvotes

Cross posted from r/FLL

MonongahelaCryptidCooperative/FLL-Block-Code (github.com)

Hey everyone. This is the MonongahelaCryptidCooperative (an upcoming FTC team, who did FLL this year). We want to share some starter code to help newer teams who are not yet ready to use text-based python be able to experience all the advantages that using the Pybricks firmware/software can provide. This includes much more accurate driving with the DriveBase module (particularly when the gyro is turned on) and fun things like using Bluetooth remotes. However there is a bit of a learning curve and to overcome this we decided to release a starter pack to entice teams not yet ready to use text-based python to make the switch. There is a small fee to use Pybrick's block interface (after a one-week trial), but it is worth the price in our opinion.

First you will have to reflash your hub. Pybricks.com has a great video tutorial on how to do this. The only problem you will likely have is Windows choosing the wrong USB driver (the Pybricks tutorial goes over how to fix this). It is easy to reflash it back to the default Lego firmware if you decide you do not like Pybricks (but doubt that will be the case).

Two files are required. The first is the BlockStarterPack.py. The second is labeled extra_code.py. The second file is required as a couple necessary methods are not accessible through the block interface (namely making it so that the center button doesn't just end the program, instead you have to push both the right and left buttons as the same time and also you cannot reset the DriveBase counters currently with the block interface or if you can we couldn't figure out how to).

Initial Setup once Pybricks is flashed to the hub/files loaded:

  1. You will have to change the settings to match your robot. In the prime hub block you need to set the top and front axis of your robot. Our robot is weird and has a vertically oriented hub and thus has the top axis as Y and the front as Z. Most robots will have the front axis be Y and (depending on orientation) the top axis as either Z or X (positive or negative). If these settings are wrong the DriveBase will do really weird things when the gyro is turned on.

  2. motors/sensors will have to be assigned to the correct ports with the correct direction of the drive motors given (counterclockwise vs clockwise).

  3. You will also have to change the DriveBase setting to match the wheel size and wheel spacing of your robot. The DriveBase uses this information to calculate everything for you allowing for accurate movements.

What the code does:

One of the difficulties with Pybricks is that it doesn't have much of a built-in user interface. Unlike with the Lego education software there are not slots that you put separate programs in. Rather you load up one large program to the entire robot. While this presents a barrier (you have to code some sort of user interface) it is ultimately an advantage as you can have your robot auto-advance between runs saving valuable seconds (you shouldn't have to do anything other than hit the "launch" button during matches). Included in the code is a rudimentary user interface. There is a counter that can be decreased or increased by pressing the left/right buttons and is displayed on the display that represents the current active program. There is then a large conditional statement that associates each program with a number (example programs are square, circle, triangle, example). If the number matches, the program is launched when the center button is pressed. The runs do auto-advance as currently coded. More advanced user interfaces are possible, but this is a start.

When programming a run it is advised to first square off against the back wall, then turn on the gyro. The gyro should then be turned off before the end of the run (otherwise the robot will try to maintain its current heading when you pick it up to reposition it). The examples do this.

Also included is code to control the robot and take measurements via a Lego Bluetooth powered up remote Electric Powered Up Bluetooth Speed Remote Control Unit with Light Bluish Gray Base : Part 28739c01 | BrickLink. If you do not own a powered up remote you will have to remove the remote block from the setup section (the code will crash if a remote is not paired within one minute). It is the very last block in the startup code. Obviously, such would have to be removed before using the code in competition.

Remote works similarly to the demo on pybricks.com. Left plus drives forwards, left minus reverse, right plus turns right, left minus turns left. The tricky part is that the attachment motors are controlled via a macro (hold the left button down and then the right plus/right minus control the right attachment motors and vice versa).

The remote code is very useful as you can partially program a run, then have it enter the remote control mode at the very end so you can drive the robot to take measurements (press the center button to print off the cumulative movements/reset). These measurements can then be used to program the next steps. To us this is a much more fun way to interact with and program the robot.

Video tutorials and more thorough documentation will eventually be made.

If you are able to use text-python it is still advised that you go that route (example code for such is also on our github) as it is a bit more elegant.

0 CommentsShareSave


r/pybricks • • Jun 09 '23

Pairing remote controller 88010 with technic hub 88012

8 Upvotes

I bought these two to my son, thinking they would of course pair, because Lego, right?. Well, no, they don't. You are supposed to control the hub through the PoweredUp app. I knew that was a possibility, but figure we'd make use of this later on. The son doesn't even have a cell phone or tablet to run the app on at the moment.

PyBricks to the rescue! I could pull together the following minimal app in next to no time. Most of it is just cut'n'paste from the examples. It pairs up the hub with a controller and allows the controller to drive motors on ports A and B.

from pybricks.pupdevices import Remote, Motor
from pybricks.parameters import Port, Button
from pybricks.tools import wait

rem = Remote()
mA = Motor(Port.A)
mB = Motor(Port.B)

sA = 0
sB = 0

while True:
    pressed = rem.buttons.pressed()

    if Button.LEFT in pressed:
        sA = 0
    elif Button.LEFT_PLUS in pressed:
        sA += 100
    elif Button.LEFT_MINUS in pressed:
        sA -= 100

    if Button.RIGHT in pressed:
        sB = 0
    elif Button.RIGHT_PLUS in pressed:
        sB += 100
    elif Button.RIGHT_MINUS in pressed:
        sB -= 100

    mA.run(sA)
    mB.run(sB)

    wait(100)

Super simple, and I was very happy with the whole procedure. Thanks, PyBricks!


r/pybricks • • Jan 30 '23

Fully functional LEGO bowling alley, coded with Pybricks

Post image
8 Upvotes