1. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    It's really up to you. We put everything in one repository and called the original version DCC++ Classic and the new one DCC++ EX. You can switch between them in about 30 seconds so it's not a problem. We even have an installer. I tested three versions yesterday and switched between 2 versions 3 times. We "fixed" a couple of things in DCC++, like making the way it sends packets NMRA compliant. We didn't just abandon it, but we are not adding features to it. Just bug fixes if we find them. EX is one of the ways forward. I think we have added a lot to it. It is stable. Or at least was until I heard about an issue yesterday with one person with an Uno that has stumped me so far. ;) You could help us by using it and giving input. With JMRI, you really don't do anything because IT handles everything, but you can play in the DCC++ Command window in JMRI or the Arduino IDE for fun ;) Just enter letters between < and > brackets and see what happens. LOL.

    There isn't anything that would cause a learning curve to go to EX. We took the original code and added things to it. It looks very much the same. We have a partial list of features and I am trying to get it organized and to have release notes with each version. We added things like being able to enter and track your short circuit current in milliamps instead of trying to figure out Arduino pin readings. We created support for other motor boards (even more than one at a time) and current sense boards. We worked on how it creates and generates the packets. We continue to perfect CV reading and writing. We changed program track current to be in the NMRA spec of 250mA while allowing full board current on MAIN. We added separate control of the MAIN and PROG track. And more. They don't increase complexity, because if you don't use that feature, it is invisible. But if you want to read sensors or control turnouts or use outputs, you can.

    Yes, the language of Arduino is C++. The environment we work in is PlatformIO. So you download "Visual Studio Code" for free and then add the PlatformIO plugin. I used another version control system so learned Git and how to use GitHub to track versions and upload things to the server. You can use the command line or the "Git Gui" to be able to roll back changes or test things or push things up to the server for approval. You don't have to do all that or any of it. You can just use the Arduino IDE and still use it like a text editor and basic compiler. But PlatformIO helps if you are a coder or want to learn more. It has autocomplete, manages libraries, finds errors, lets you click on something and go to its declaration, etc. Most of the things that make your life easier when you are working with multiple units. So two more things I need to document are how to install the development environment and how we use GitHub, and more about each unit and what is each unit and how certain routines work. It really is easy. I was not that proficient in C++, I worked in Delphi and VB.NET and C#. But once I got in the code, I was able to figure it out. I had a couple of good programmers that were at it longer help. Atani for one. If you want to look at the code and ask questions, I'm happy to help. The hardest part really is probably the code that generates the packets. If you haven't seen bit and byte manipulation in C++ and how a packet is structured from the NMRA, that is the hardest thing to figure out without help. But once you do, you see it is just sticking 1s and zeros in stuff and shiting them around :)

    If you like, you can PM me when you are ready and I can point you to one thing at a time to look at. Just going to the repository here https://github.com/DCC-EX is a good start. You can go into EX and look at the code. You can post issues, suggest a change, etc. You can even edit code there.
     
  2. Uncle peanut butter

    Uncle peanut butter TrainBoard Member

    179
    238
    9
    So even though I have DCC++ installed on the mega 2650 I can install DCC-EX on top of it with no harm?
    Overall I’m looking for stability.
    As far as altering code goes you may not need my help just yet!
    Would love to try to learn though.
     
  3. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    Yes. Every time you click on the upload button, it erases everything (except for anything you stored in EEPROM like turnouts and sensors) and installs new code. So if you are using the Arduino IDE, you can have two folders, one for each project. In Arduino, the main main.cpp file has to be named XXX.ino and the folder it sits in has to be named the same. So for for us, you would put all the files in the DCCppEX folder and for DCC++ you put them in the DCCpp_Uno folder. Now you just open the one you want and tell it to upload. Once you open both projects, they will be in your recent list. Just remember which one you load, "Uno" vs. "Ex" :). When you start up the serial monitor in the Arduino software, you will see the version displayed. I'll add 'EX' to 'DCC++' in that string to to make it even more clear what version you are running. But when it boots if you look at the serial monitor or you type <s>, DCC++ EX is version 2.x.x where Classic is 1.x.x. So it is easy to switch between them, but you doing it by uploading the version you want. Same thing of course when a new version come out. Just delete the files in the right folder to be safe, copy the new files in there, and upload.
     
    Last edited: May 3, 2020
  4. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    I think you should still show us what @Jimbo20 wanted to see if you can. That missing library when you compile the sketch.
     
  5. Uncle peanut butter

    Uncle peanut butter TrainBoard Member

    179
    238
    9
  6. FlightRisk

    FlightRisk TrainBoard Member

    548
    237
    14
    On an Uno, stick with classic at the moment. It has so little memory. I'll keep you posted.
     
  7. Uncle peanut butter

    Uncle peanut butter TrainBoard Member

    179
    238
    9
    I’ll go back and make the mistakes you helped me correct to see if it repeats.
     
  8. Uncle peanut butter

    Uncle peanut butter TrainBoard Member

    179
    238
    9
    @FlightRisk
    I spent a good part of Sunday vacuuming, cleaning and scrubbing the train room floor.
    Yesterday I did more reading and started to assemble the parts into a working system. Installed a decoder in my Atlas C-425, gave its wheels a good cleaning and ran through the tests you’ve been helping me with and got on with it.
    Success! Over the next few days I’ll familiarize myself with what’s going on and make a short list of wants and needs.
    Thanks again for taking a personal interest in helping me.
    Keith
     
    FlightRisk likes this.

Share This Page