Skip to content

Comment on Can Lego City Powered Up trains be automated?

Comments

Yes, you can automate LEGO trains with Pybricks. See https://beta.pybricks.com/

Pybricks lets you run MicroPython scripts on the hub. Once loaded onto the hub, you can just start the script again by pressing the button. No constant connection required.

You can even add sensors that count the track sleepers so you can get a constant speed no matter the load. Here's a demo with code.

https://pybricks.com/projects/sets/city/60198-cargo-train/sp...

You can also automate the switches so you can get pretty creative with your layouts:

https://www.facebook.com/Pybricks/videos/989683888156075

With enough supporters, we may eventually even add a block-coding language as an alternative to MicroPython.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.