YouTube doesn't want you know this subscribers secret
Get Free YouTube Subscribers, Views and Likes

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

Follow
eggybricks

Solving the fundamental incompatibility that LEGO cities have with LEGO trains: no room for a loop!

Check out https://eggybricks.com ➡ for lovinglycrafted train instructions and stickers, and sign up for the email list to get behindthescenes details and occasional offthecuff 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 webbased development environment that lets you program the hub in Python, from your computer. Pybricks is fully webbased, 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 firstparty 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/poweredupco...
‪@Brickostan‬ 's automation code blocks tutorial:    • Lego Powered Up Automatic Train Contr...  

posted by nakrcanigz