MicroPython REST API for controlling a Rail Yard from a Raspberry Pi Pico W
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
MicroPython REST API hosted from a Raspberry Pi Pico W
capable of controlling Rail Yard devices.
Rail Yard is an iOS
app that communicates with the REST API. Download the app here:
There are some macOS
prerequisites before installing the firmware and build files on your Raspberry Pi Pico W
. Once these are completed, you can skip straight to Installation.
Install homebrew
:
-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install Python
:
-
brew install python
Test your installation by running:
-
which python3
You should see something like: /usr/local/bin/python3
Install git
& download repo
Install git
:
-
brew install git
Clone the repo:
-
git clone https://github.com/jakee417/Pico-Train-Switching.git
Installing the firmware and build files:
- Run the installation script for Raspberry pi pico w:
Or for ::
python3 install.py firmware/RPI_PICO_W-20241129-v1.24.1.uf2
python3 install.py -v /Volumes/RP2350 firmware/mp_firmware_unofficial_latest.uf2
Warning
Ensure your Raspberry Pi Pico W
is the only connected usb device before completing the next step.
- Connect your
Raspberry Pi Pico W
to a usb port in BOOTSEL mode
-
Running the REST API is automatic, simply power on your
Raspberry Pi Pico W
to interact with the REST API. -
Running the REST API in dev mode from a MicroPython REPL:
from bin.main import run; run()
For more examples, please refer to the Documentation
Distributed under the MIT License. See LICENSE
for more information.
Jake - @github_handle
Project Link: https://github.com/jakee417/Pico-Train-Switching