we built a self-driving FLEET of LEGO trains!

eggybricks February 2, 2025
Video Thumbnail
eggybricks Logo

eggybricks

View Channel

About

Welcome to eggybricks!! We love LEGO here.

Latest Posts

No results found. Try different keywords.

Video Description

✅ To build any of the LEGO trains in this video, check out https://eggybricks.com ! Become a patron to get quarterly paper goods by mail, video shoutouts, and our undying gratitude!! https://patreon.com/eggybricks 🍳 All the code to run this on your own layout, without any LEGO train crashes, is up at: https://github.com/eggybricks/self-driving-lego-trains --- ALSO All the pieces in this video are first-party LEGO components! We made a short guide to how to add a color-and-distance sensor to our LEGO freight trains, but it should work for any other PoweredUp LEGO train (e.g. any recent motorized LEGO train, like 60337): https://github.com/eggybricks/self-driving-lego-trains/blob/main/instructions%20-%20adding%20color-distance%20sensor.pdf Other stuff shown in this video that you'll need to run everything: - Pybricks itself: https://pybricks.com/ (the Python version is totally free — only the code blocks are paid) - @BatteryPoweredBricks x Tom Cook motorized switch: https://rebrickable.com/mocs/MOC-147294/BatteryPoweredBricks/low-profile-switching-machine-mod These ones are affiliate links, which help support the channel: - LEGO switch tracks (20% off right now): https://amzn.to/4jDvkBL - LEGO train tracks: https://amzn.to/3EkhNPn --- In this video, we crash five LEGO trains, then try our best to run them on the same track without crashing them. Includes LEGO PoweredUp; Pybricks; A-star, Dijkstra's, and breadth-first pathfinding; some light Python programming; motorized switches switching in sync; LOTS of LEGO trains. The final automated LEGO train control system handles multiple trains safely, balancing: - Finding the shortest route (like Google Maps) - Avoiding conflicts with other trains (like air traffic control) - Planning reversals when needed --- chapters: 0:00 the LEGO train control problem 1:57 step 1: control the switches 5:33 step 2: control the trains 9:12 step 3: pathfinding 13:40 step 4: better, faster, stronger 16:43 step 5: all the trains!! traffic control 22:44 CHALLENGE ROUND train crashes at 0:20, 1:44, and 16:44 lego trains lego train crashes lego train control systems air traffic control how to build lego trains lego MOCs 2025 eggy bricks how to build lego trains air traffic control lego train automation self-driving trains ai trains control tower

You May Also Like

Essential Gear for Your Next Shoot

AI-recommended products based on this video

Loading...
EMEET C960 Webcam with Tripod, 1080P Webcam with Microphone, Adjustable Height Mini Tripod, C960 Web Camera with Privacy Cover, Plug & Play with Stand for Zoom/Skype/YouTube/FaceTime

EMEET C960 Webcam with Tripod, 1080P Webcam with Microphone, Adjustable Height Mini Tripod, C960 Web Camera with Privacy Cover, Plug & Play with Stand for Zoom/Skype/YouTube/FaceTime

(33,760)
49.99
PrimeFREE delivery Saturday, June 14
500+ bought in past month
Loading...
ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

(13,939)
109.99
FREE delivery Saturday, June 14
9K+ bought in past month
Loading...
Anker iPhone 16 Charger, 2-Pack 20W Fast USB C Charger Block, for iPhone 16/16 Pro Max/15 Series/iPad Pro and More (White, 2 Pack & 2 Cable)

Anker iPhone 16 Charger, 2-Pack 20W Fast USB C Charger Block, for iPhone 16/16 Pro Max/15 Series/iPad Pro and More (White, 2 Pack & 2 Cable)

(16,565)
13.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
10K+ bought in past month
Loading...
Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(Black),1pack) ClimatePartner certified

Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(Black),1pack) ClimatePartner certified

(109,961)
$17.99$17.81
FREE delivery Fri, Aug 8 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
UGREEN Magnetic USB C to 3.5mm Audio Adapter and Charger 2 in 1 Hi-Res 32bit/384kHz Aux to USB C with PD 60W Fast Charging Dongle Cable for iPhone 16/15 Pro Max, Galaxy S25Ultra, Pixel 9, iPad Pro/Air

UGREEN Magnetic USB C to 3.5mm Audio Adapter and Charger 2 in 1 Hi-Res 32bit/384kHz Aux to USB C with PD 60W Fast Charging Dongle Cable for iPhone 16/15 Pro Max, Galaxy S25Ultra, Pixel 9, iPad Pro/Air

(1,308)
19.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
1K+ bought in past month
Loading...
Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(Black),1pack) ClimatePartner certified

Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(Black),1pack) ClimatePartner certified

(109,961)
$17.99$17.81
FREE delivery Fri, Aug 8 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
Anker USB C to USB C Cable, Type-C 60W Fast Charging Cable (6FT, 2Pack) for iPhone 16 Series, iPad mini 6 and More (Black) ClimatePartner certified
Best Seller

Anker USB C to USB C Cable, Type-C 60W Fast Charging Cable (6FT, 2Pack) for iPhone 16 Series, iPad mini 6 and More (Black) ClimatePartner certified

(44,096)
$8.49
FREE delivery Thu, Jul 3 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
Soundcore by Anker P20i True Wireless Earbuds, 10mm Drivers with Big Bass, Bluetooth 5.3, 30H Long Playtime, Water-Resistant, 2 Mics for AI Clear Calls, 22 Preset EQs, Customization (Blue)

Soundcore by Anker P20i True Wireless Earbuds, 10mm Drivers with Big Bass, Bluetooth 5.3, 30H Long Playtime, Water-Resistant, 2 Mics for AI Clear Calls, 22 Preset EQs, Customization (Blue)

(62,301)
19.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
10K+ bought in past month