Sprog commands

GBmac04 Jan 2, 2019

  1. GBmac04

    GBmac04 New Member

    3
    0
    1
    Hi,
    I'm new to modelling and have only a small n gauge layout with the DCC supplied via a Sprog II . My main interest is in writing some scripts to automate the track layout. I don't want to use the JMRI app. Does anyone know where I could find the commands that come out of the panel/decoder pro application being sent to a sprog?
     
  2. lnxlnx

    lnxlnx TrainBoard Member

    24
    20
    7
    EsK likes this.
  3. GBmac04

    GBmac04 New Member

    3
    0
    1
    Thanks, really helpful. That information isn't in the later user guides.
    I now have my PC talking to the Sprog on com port 3 and the Arduino UNO reading track sensors etc talking to the PC on com port 4. I'm finding the code writing so addictive!!!
     
  4. lnxlnx

    lnxlnx TrainBoard Member

    24
    20
    7
    Glad to help but coding can be too addictive.
    Hope you don't need a 12 step program to help you over come it :)
     
  5. GBmac04

    GBmac04 New Member

    3
    0
    1
    I used Decoder Pro to send commands to the Sprog. The Sprog Command Console shows me what commands are being sent.
    For some reason the throttle doesn't work and the Sprog just returns an error code "!E6", but I found that F3 button sends codes to start and stop the train.
    Start train half speed O 03 84 87
    Stop train O 03 80 83.
    I've put these values into my Processing3 code and all works well.
    However, DecoderPro also allows me to reverse the train but the Command Console doesn't show any code being transmitted, although it does get the rep: "P>" back from the Sprog.
     

Share This Page