Lanbahn software for controlling Locos with SPROG
- see http://www.lanbahn.net/sprog-raspberrypi
1) copy all files in a directory 2) install nodejs ( for example installation on raspberryPI: wget http://node-arm.herokuapp.com/node_latest_armhf.deb sudo dpkg -i node_latest_armhf.deb ) 3) install the node modules "dateformat" and "serialport" ( for example installation on raspberryPI: sudo npm install dateformat serialport ) 4) change settings (sprog serial port) in sprogDevice.js 5) start program with: node lanbahn2sprog.js
1) SPROG, see http://www.sprog-dcc.co.uk/ 2) a throttle to send the lanbahn UDP commands (like LanbahnThrottle for Android, see http://www.lanbahn.net)
After starting the software with "node lanbahn2sprog.js" a UDP multicast client is listening to UDP messages on the LANBAHN port 27027 and LANBAHN multicast group. When the client receives a "LOCO" message with a valid loco address and valid data like "LOCO 211 50 1 1 0 0 0 0" (=Loco address 211, speed 50, forward, F0 on, other functions off), the program will start generating DCC packets and send them to SPROG via USB .
Understands only "LOCO" and "POWER" commands so far and only sends DCC packets with 128 speed steps and Functions F0 ... F12.
The baudrate has changed to 115200 (defined in sprogDevice.js)
the serialport is now /dev/ttyS0
if using the RaspberryPi 3, carefully read the notes in the manual (i.e. disable bluebooth)