2 trains and a switch track #2337
Unanswered
captshadab
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hello
i have been trying to make this work since last 2 days but have failed
i have 2 trains
master and slave
one loop with a switch at one end.
color sensors installed in both trains
program i need to work
master runs and stops at black tile
broadcasts REQUEST_RUN
slave train runs when it receives this command
slave see the red tile
stops and broadcasts RUN_COMPLETE
also the switch track motor is configured to turn when these commands are received
my code
master train
slave train
it does work like 1 or 2 times and then just nothing happens. both trains remain stopped
please help me solve this thing. my first ever train set and i want it to work
MASTER_SWITCHTRACK.py
Slave.py
Beta Was this translation helpful? Give feedback.
All reactions