A model railway throttle for the Pico.
- Pico W
- Kitronic Simply Robotics Motor Driver Board
- Power Supply (12V maximum)
- Locomotive (or any 12V motor)
-
Install Poetry
-
Setup Poetry
-
Run Ruff
python -m ruff check --fix
-
Run PyTest
python -m pytest
With thanks to SoongJr for the WiFi configuration and depedency installation scripts and instructions.
- Flash micropython onto your pico (you can get the latest build)
- Transfer and run
setup/configure-wifi.py
on the pico (after which you have to hit Ctrl+X to get out of REPL)This will prompt for credentials and write them into a file on the pico, so there is no chance you'll accidentally upload them to github.rshell 'cp setup/configure-wifi.py /pyboard; repl ~ exec(open("/configure-wifi.py").read())'
- Run
python .\src\setup\sync.py
to transfer all files fromsrc/rp2
to the pico board
Use the Pico Device Controller to run main.py
, server.py
, or one of the sandbox scripts.
The external library umqtt.simple
is required to be loaded onto the Pico.
- Lever Icon: Gambling icons created by Freepik - Flaticon