Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 1.17 KB

File metadata and controls

20 lines (12 loc) · 1.17 KB

PyBricks-Train-Motor-Control-Script

This script allows you to control Lego Trains via PyBricks without using the official Powered Up App.

Origionally, this was a modification of a script Lok24 designed, but was incompatible with the latest version of PyBricks (v3.2.x). I updated the script to work with modern versions of PyBricks.

Since then, Lok24 has provided his own updated version of the script with modern PyBricks support, and I have replaced my changes with his.

More information about the script from Lok24: https://www.eurobricks.com/forum/index.php?/forums/topic/187081-control-your-trains-without-smart-device-with-pybricks/

PyBricks: https://code.pybricks.com/

Light Support

The official Powered Up Lights now work with the script!
-Lights should work in both ports, even 2 sets of lights at the same time. Both sets will always be set to the same brightness level.
-The B buttons on the remote always control the lights. Holding up or down will increase/decrease the brightness. Pressing the red button turns the lights off or fully on
-By default the lights start off, but you can change that by modifying lightValue in the user defined values