Train layout automation #227
Nelvarion
started this conversation in
Show and tell
Replies: 3 comments 1 reply
-
This is great, thanks for sharing! Is there a video of this system in action somewhere? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Not yet, coding is silent, LEGO trains... not so much. 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
-
As promised, a quick video demonstrating the project. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is an adaptation of the hub->pc->hub communication demo.
The purpose is for a hub with motors connected to 1 or more switch points to change the track direction based on input from an oncoming train(s).
In addition, it will include other cases for the trains - stopping at stations, slowing/speeding, etc. - based on color sensor mounted on the trains, using colored tiles on the track (custom colors are defined to increase the possible cases).
Main change from the original notebook is wrapping the connection to the different hubs in
try catch
to allow each component to work independently from the others - this will let you stop each piece for battery replacement or maintenance, without having to reset the entire layout.It's still a work in progress:
1.1 Add the different cases for trains
1.2 Add a remote control to allow for an interactive layout in shows - let people control different parts of the layout
2.1 Utilize Control+ hub(s) for switch control (once my BL order finally arrives)
2.2 Build extension cables to reduce the number of hubs needed and increase the reach of each hub
Any feedback or comments are welcome!
https://github.com/Nelvarion/pybricksdev-demo/blob/master/test-wrapper.ipynb
Beta Was this translation helpful? Give feedback.
All reactions