More information about this project canbe found at:
http://tren.enmicasa.net/railpic
and
https://gitlab.com/RailPIC/rpicd
The documentation is still not completed.
RailPIC is a project to embed the control of model railways in a PIC connected to an ARM device. Currently the project supports Raspberry Pi and Odroid, but it should work on any ARM device running Linux.
The rpicd software is the part of the solution that translates the commands received from a control software to the protocol used by RPIC (the embedded software in a PIC generating the signals to the track. It emulates a MCS2 station.
To run this docker, using docker-compose:
version: '3'
services:
rpicd:
container_name: rpicd
image: raildocker/rpicd:arm6
volumes:
- config:/config
# - /sys/class/gpio:/sys/class/gpio
#First part should match the named volume at the end of the file,
#Second part (the docker part) should match the WORKDIR ENVRIRONMENT at the environment section
#This folder should be the same as the one set in rpicd as config folder.
- /sys:/sys
#Uncomment to run on x86 directories
# - /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static
ports:
- "8015:8015"
- "15731:15731/udp"
environment:
- WORKDIR=/config #It should match the mapping part of the docker (second part) in the volume define above
#restart: always
devices:
#https://stackoverflow.com/questions/53094979/how-to-enable-wiringpi-gpio-control-inside-a-docker-container
#https://stackoverflow.com/questions/30059784/docker-access-to-raspberry-pi-gpio-pins
# - "/dev/gpiomem:/dev/gpiomem"
# - /dev/gpiomem:/dev/gpiomem
- /dev/gpiomem:/dev/gpiomem
# - /dev/ttyAMA0:/dev/ttyAMA0
- /dev/ttyAMA0:/dev/ttyS2
#This seems to be necessary to deploy in portainer (at least in odroid)
#https://docs.docker.com/config/containers/resource_constraints/#prevent-a-container-from-using-swap
#https://github.com/portainer/portainer/issues/2576
#mem_swappiness: -1 # temp workaround
volumes:
config: #it should match the volume defines on top.
# name: config
driver: local
#weird fonfiguration due to bug:https://github.com/portainer/portainer/issues/1989
Then in config you need to deploy a valid rpicd.xml config file. For exampels, look at http://tren.enmicasa.net/railpic/.
Note if you are planning to run rpicd jointly with railhome, you need to build a compose file with both services.You will also need to include the following sections under the rpicd service:
depends_on:
- "railhome"
environment:
- WORKDIR=/config #It should match the mapping part of the docker (second part) in the volume define above
- RAILHOME=yes #To sync with a git repository -see railhome images.
Content type
Image
Digest
sha256:babc14c0b…
Size
58.3 MB
Last updated
over 1 year ago
docker pull raildocker/rpicd