brickrail icon indicating copy to clipboard operation
brickrail copied to clipboard

[Feature] multiple motors/hubs per train

Open Novakasa opened this issue 2 years ago • 3 comments

requested on youtube: https://www.youtube.com/watch?v=cBF-G4d4vw8&lc=Ugyaq-p0Sv_qh-kbco94AaABAg

lots of thinking needed for this one though

Novakasa avatar Sep 01 '23 19:09 Novakasa

maybe just have a second ble_train assigned to the layout train? Needs to be in a "puppet" mode, and the other hub will be "master" and have the sensor. Maybe allow for two sensors?

Novakasa avatar Sep 01 '23 20:09 Novakasa

The issue will be the communication between the two hubs. If it has to go through the PC, this might take too long. Maybe the pybricks advertising communication might work?

Novakasa avatar Sep 01 '23 20:09 Novakasa

Right not it should probably be the same program running on "puppet" and "master", where master has the sensor. The hubs will detect automatically whether they have a sensor or not and maybe send that to PC, which can sanity check. Since sensor advance will be sent from master to PC anyway the PC can forward the sensor advance command to the puppet hub. This will have some delay but hopefully not too much.

Novakasa avatar Sep 21 '23 17:09 Novakasa