Press "Enter" to skip to content

Pybricks: MicroPython for Lego robotics sets

Die Open-Source-Software Pybricks, based on MicroPython, so far has been used for most Bluetooth-enabled controllers (“Powered Up”) like Lego Boost, City, Technic as Mindstorms and Spike ported. Not only the controllers, but also the various sensors and actuators are supported. The inexpensive ones benefit particularly here Boost-, City– and Technic-Bricks that could previously only be controlled via an app on the smartphone or tablet using graphic programming. Pybricks on the other hand, runs autonomously on the brick and up to a hundred times faster.

More from Make

More from Make

More from Make

at Mindstorms– and Spike-Bricks it has always been possible to let them act autonomously, but the common API now makes porting the controls from one brick to another much easier. The Web IDE runs on Chrome (Windows, Mac, Linux, Chromebook and Android) and accesses the controllers via Bluetooth. From the Web site it is also possible to use the Pybricks-Firmware to be installed. The original Lego firmware can be reloaded via the Lego app if you (or the kids) want to go back there.

On the smaller controllers like that Boost-Hub, is Pybricks-MicroPython somewhat restricted. For example, floating point numbers are not supported. There is also no space on the hub to save a program, so the program must be loaded onto the controller along with the firmware, which takes a few minutes. As long as you are connected to the controller via Bluetooth, you can test your program in seconds and read the output on the REPL interface. In the IDE you have direct access to the well-made documentation, which also provides many examples.

All in all, a very welcome development, especially for Lego Boost worth it. Of the Boost-Hub provides two smart, PID-controlled servo motors, which can also be used as rotary encoders, and connection options for the supplied, combined light, color and distance sensor. There is also a third engine in the Boots-Sets that can also serve as an encoder. Together with the really useful Lego parts contained in the sets, you can already have a Build crowd and thanks Pybricks finally let its construction act autonomously.

Do you want to know more? The 86-page Make MicroPython Special offers an easy introduction to and changeover to programming microcontrollers with Python. Printed, as PDF or in a bundle.


Article Source

Disclaimer: This article is generated from the feed and not edited by our team.