solving the LEGO city train problem (no room for loops!)

eggybricks
eggybricks
302.6 هزار بار بازدید - 2 سال پیش - Solving the fundamental incompatibility that
Solving the fundamental incompatibility that LEGO cities have with LEGO trains: no room for a loop!

Check out https://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:
https://github.com/eggybricks/powered...

PoweredUp code blocks for automating your LEGO train or tram to go back and forth forever, stopping at specific spots:
https://github.com/eggybricks/powered...

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 https://code.pybricks.com. The working code we built in the video is here: https://github.com/eggybricks/powered...

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: https://github.com/eggybricks/powered...

Other helpful resources:
- Pybricks Getting Started: https://pybricks.com/install/
- ‪@RacingBrick‬ 's PoweredUp code block guide: https://racingbrick.com/powered-up-co...
- ‪@Brickostan‬ 's automation code blocks tutorial: Lego Powered Up Automatic Train Contr...
2 سال پیش در تاریخ 1401/05/28 منتشر شده است.
302,637 بـار بازدید شده
... بیشتر