This project demonstrates how to control Lionel Train Switches from a Raspberry Pi (RPi
).
or
Lionel Manual Switches
- Connecting SG-90 Servo to
RPi
- TODO: Setup for building clay structures
Lionel Remote Switches
- Connecting remote switch to the control relay remote switch
- Connecting
RPi
to control relay - TODO: Include a simplified wiring schematic
Since our project relies upon the pigpiod
pin factory, start this daemon:
sudo systemctl enable pigpiod
cd ~
git clone https://github.com/jakee417/Pi-Train-Switching.git
cd Pi-Train-Switching
# Now run the setup helper
./install.sh
And uninstall with,
./uninstall.sh
If this fails due to a User Service
, then ensure this line,
export XDG_RUNTIME_DIR=/run/user/$(id -u)
is found in the ~/.bashrc
file followed by a system reboot, sudo reboot
. This error is commonly caused when developing from a ssh
connection.
- First, ensure the
RPi
and client machine (laptop, cellphone tablet, etc.) are on the sameWiFi
network. - On your client machine browse to
http://raspberrypi.local:5000
. If you have a customhostname
, replacerasberrypi
with your customhostname
. - Alternatively, on the
RPi
you can run,
ifconfig wlan0
You should see something like this (likely with a different inet
value),
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.204 netmask 255.255.255.0 broadcast 10.0.0.255
...
Browsing to the inet
field with http://10.0.0.204:5000
will also allow you to view the web server.