LocoLinx on Arduino UNO with FremoLNShield

Contents


The Arduino UNO and the FremoLNShield are great Hardware for LocoLinx
The Arduino UNO and the FremoLNShield are great Hardware for LocoLinx

Install Arduino IDE

Download from https://www.arduino.cc/en/Main/Software and install.
I used Version 1.6.9 / Windows Installer.

Download LocoNet Library from MRRWA

Follow Instructions on http://mrrwa.org/download/ for download and import.

Install LbServer

Install on Windows

Download latested LbServer_0.NN_Win32_Setup.zip from https://sourceforge.net/projects/loconetovertcp/files/LbServer/, unzip and execute setup.exe.

Install on Linux

Download latested LbServer_0.NN_Source.zip from https://sourceforge.net/projects/loconetovertcp/files/LbServer/, unzip, build and execute make install. You can validate the installation by starting the help screen of LbServer with LbServer -h.

$ unzip LbServer_0.11_Source.zip
$ cd LbServer_0.11_Source/server/LbServer/
$ make
g++ -pipe -Wall -W -O2 -g -fexceptions ...
$ sudo make install
strip --strip-all Debug/LbServer -o Release/LbServer
cp Release/LbServer /usr/local/bin/
$ LbServer -h
LocoBuffer Server version 0.11.0.0, for protocol version 1, built Jul  6 2016,
released under GPL by Stefan Bormann.  Linux port by Ian Cunningham.
...
$

Setup Hardware

Required:

Connect Arduino and Shield. Set Jumper RX and T6 on shield. Remove all other Jumpers.

Close TX and T6 Jumpers
Close TX and T6 Jumpers

Load Arduino with Sketch

  1. Start Arduino IDE
  2. Open Sketch:
    File >> Examples >> LocoNet >> LocoLinx
  3. Select Board
    Tools >> Board >> Arduino/Genduino UNO
  4. Connect Arduino to PC using USB-Cable
  5. Select Port
    Tools >> Port >> COM14 (Arduino/Genduino UNO)
    (port number may vary)
  6. Upload Sketch
    Sketch >> Upload
  7. Wait until sketch has been compiled and uploaded

Test

Connections: Left: USB to PC, Right: LocoNet
Connections: Left: USB to PC, Right: LocoNet

Test on Windows

  1. Configure LbServer
    Start >> All Programs >> LocoNet over TCP >> LbServerConfig
Use 57600bps without flow control
Use 57600bps without flow control
  1. Start LbServer
    Start >> All Programs >> LocoNet over TCP >> LbServer

  2. Connect some Clients and see if Receive and Send is working:

The Output of LbServer
The Output of LbServer

Test on Linux

  1. Start LbServer from a terminal with required arguments.

  2. Connect some Clients

    $ LbServer /dev/ttyACM0 1234 57600 false
    LocoBuffer Server version 0.11.0.0, for protocol version 1, built Nov 21 2013,
    released under GPL by Stefan Bormann.  Linux port by Ian Cunningham.
    
    Loconet device port opened on /dev/ttyACM0 with 57600 baud without CTS flow control.
    Output uses single characters for increased performance:
    R=received packet, .=nothing received but event was signaled :-(
    s=send request, S=sent successfully, e=send error
    C=client connected, D=client disconnected
    RRRRRRCsRSRsRSsRSsRSsRSsRSsRSsRSsRSsRSRRRRRRsRSRsRSsRSRsRSsRSDRRRR
    

Other Resources

John Plocher has also designed a nice LocoNet Shield (check pin numbers):
http://www.scuba.net/wiki/index.php/LocoShield