The Duplo Hub cannot be updated, so you cannot install Pybricks on it.
However, you can connect a supported hub running Pybricks to the Duplo Hub
and control the train that way.
You can you control the motor, sound, and headlights, and read the speed
and color sensors.
Parameters:
name (str) – Bluetooth name of the hub. If no name is given,
the hub connects to the first Duplo Train hub it finds.
timeout (Number, ms) – How long to search for the hub.
Choose None to wait indefinitely.
connect (bool) – Choose False to skip connecting.
connect() can be called later to connect.
Raises:
OSError – If the connection attempt fails or times out.
For the newer (dark blue) train, we have not yet figured out the right
sound codes. Please open a discussion or pull request if you know how
to do it. Thanks!
Parameters:
sound (str) – Name of the sound to play. Choose from
"brake", "depart", "water", "horn",
or "steam".