Skip to content

michael71/Lanbahn-Sprog

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

Lanbahn-Sprog

This is BETA software currently!

Lanbahn software for controlling Locos with SPROG

- see http://www.lanbahn.net/sprog-raspberrypi

Installation:

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

Pre-Requisites

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)

How it works

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.

Notes for pi-SPROG-one:

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)

About

BETA Lanbahn program (nodejs) for controlling SPROG IIv3 or SPROG 3, using UDP commands for LOCO control (model railroad).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published