Introducing DCC++ ---a complete open-source DCC station and interface

Gregg Aug 25, 2015

  1. Ian Robins

    Ian Robins New Member

    5
    0
    1
    Thanks for the reply Jim. Sorry, the LED I was referring to was the one on pin 13. I'll have another try and let you know how I get on.
     
  2. Ian Robins

    Ian Robins New Member

    5
    0
    1
    Hi Jim. Thank you very much for your supply. Sorry I didn't make it clear which LED I was referring to. I was testing the Mega by putting a jumper between pin 13 and 3 which put the LED (L) next to pin 13 out. As I understand it, sending a <1> to the mega should then turn this back on. All that happens is that the LEDs L, TX and DX briefly flash.
     
  3. Jimbo20

    Jimbo20 TrainBoard Member

    178
    146
    7
    Hi Ian, I understand now that you are trying the Diagnostic routine, so I assume you don't have a motor board installed. (I didn't ever try this myself as I don't have a standard Arduino.)

    However, have you tried resetting the Arduino or sending <s> to it? You should get some legible status text returned on the serial monitor. E.G. something like:
    "iDCC++ BASE STATION FOR ARDUINO MEGA / ARDUINO MOTOR SHIELD: BUILD 23 Feb 2015 09:23:57"

    If you don't get this you may simply have the serial baud rate incorrectly set on the serial monitor.

    Jim

    EDIT: From memory I think the DCC++ sketch sets the serial baud rate at 115200, so you need to make sure this is what you have the serial monitor set to.
     
    Last edited: Sep 12, 2018
  4. Ian Robins

    Ian Robins New Member

    5
    0
    1
    Hi Jim, I have Sent <s> to the Arduino and got text returned similar to your example and I do have the baud rate set to 115200.

    The text I get is "iDCC++ BASE STATION FOR ARDUINO MEGA / ARDUINO MOTOR SHIELD: V-1.2.1+ / Sep 12 2018 13:58:54><N0: SERIAL><X><X>"

    Ian
     
  5. Ian Robins

    Ian Robins New Member

    5
    0
    1
    Also Jim, As I am new to TrainBoard, should I be starting this as a new post?

    Ian
     
  6. Diehard

    Diehard TrainBoard Member

    10
    0
    4
    Hello, I tried clicking on Master, but it does not display a choice for sample-layout. Can someone please verify if it works for them or have an other way of getting the info. Thanks.
     
  7. paulie77

    paulie77 New Member

    4
    4
    4
    I actually made some headway modifying Greg's (Incredible!) work. His Throttle was exactly what I was looking for. I intend to add switch (turnout) controls either on the map itself or in the section below it. I also intended to have buttons to control layout lighting and automation.

    I made heavy modifications to his code to suit my layout. I chose not to use any of the automation as my layout is a great deal larger than Greg's. In fact, I removed everything that had to do with automation. The good news is that I heavily commented everything I did. So while these files are basically useless to everyone but me for running. They may give you some insight into what needs to be done to make modifications for your layout.

    Just a couple of notes. 1) It has been 8 months since I worked on this, so it is truly doubtful that I will be able to answer any questions. Indeed, that is why I commented everything I did within the code. 2) Model Railroading is a winter sport for me, and it's not winter. I just happened to be in a hotel room and completely bored when I found David Jennex's post above in my email. 3) I only put this up on Github to learn how to use it. So please excuse any faux pas.

    I think the most important contribution I may have made are the comments in the "controllerConfig.pde". The comments here explain what most of the variables in the commands do to control your locomotives.

    The code can be found here: https://github.com/lpcia/Controller
    I am a pretty fair C programmer in my own mind, but in fact, I'm only a rookie. With Java, I had to do a LOT of reading. That may be encouraging to some, and something darker to others!

    I attached a screenshot of my layout with the current state of the code.

    IMPORTANT. You don't have to have this connected to your layout or an Arduino to snoop around or run it from Processing. Make hardware connections at your own risk.

    Best Regards,
    Paul
    Wisconsin, USA Go Brewers!

    PS Thank you Greg for all the work you did!
     

    Attached Files:

    Last edited: Oct 15, 2018
  8. jfcastiglia

    jfcastiglia TrainBoard Member

    18
    0
    2
    very nice i was just happy to get my loco programmed on the original lol I did DL Greg's to test my hardware seeing as I cant get jmri working so i wanted to see if something else would work and as soon as I figured how to get my loco in the sketch it worked!!!. still working out my jmri issues little stuck there thinking seeing if i can get this controller to run on a raz Pi to make it easier for one of my set ups.
     
  9. Onizukachan

    Onizukachan TrainBoard Member

    17
    8
    2
    Thanks to everyone for all the work invested in this project.
    I just got DCC++ base station working on a Mega with JMRI and withrottle.
    Only difficulty I had (besides waiting forever for the China motor hat) was that the pin has changed from the time of the videos.
    It is now #2 not #5, the other end is still #13. I hope that helps someone down the road.
     

Share This Page