Solving the fundamental incompatibility that LEGO cities have with LEGO trains: no room for a loop!
Check out eggybricks.com ➡️ for lovingly-crafted train instructions and stickers, and sign up for the email list to get behind-the-scenes details and occasional off-the-cuff videos delivered to your inbox!
How to automate LEGO PoweredUp trains and trams, with either Python (Pybricks) or the LEGO PoweredUp app! Specifically, automate your train to fit in a small LEGO city that doesn't have room to hold a closed train track loop.
TL;DR:
Pybricks code for automating your LEGO train or tram to go back and forth forever, stopping at specific spots:
github.com/egg...
PoweredUp code blocks for automating your LEGO train or tram to go back and forth forever, stopping at specific spots:
github.com/egg...
Summary:
In this video, we:
- build the LEGO 60337 Express Passenger Train
- integrate the 88007 PoweredUp Color & Distance Sensor (and MINDSTORMS Robot Inventor Color Sensor) into the train, and
- show how to program it to reverse direction on cue with both Pybricks (no phone required!) and the PoweredUp app
- Mini City Update: finally get to add the train to our city!! 🚊🌆
Details:
To automate your train without using a computer or phone every time you run it, you can use Pybricks. Pybricks is two things: one, special firmware that runs on the hub, and two, a web-based development environment that lets you program the hub in Python, from your computer. Pybricks is fully web-based, so you don't need to download an app: to set it up, you just go to the website code.pybricks.com. The working code we built in the video is here: github.com/egg...
You can also use the first-party LEGO PoweredUp app to automate your train using "Code Blocks." There are some quirks, limitations, and bugs with this right now though. A working version we built to do the same thing shown in this video is here: github.com/egg...
Other helpful resources:
- Pybricks Getting Started: pybricks.com/i...
- @RacingBrick 's PoweredUp code block guide: racingbrick.co...
- @Brickostan 's automation code blocks tutorial: • Lego Powered Up Automa...
Негізгі бет solving the LEGO city train problem (no room for loops!)
Пікірлер: 210