In extras folder, click on Doc/index.html to have a complete documentation in English in your browser.
License
Copyright (c) 2017/2020 Locoduino.org. All right reserved.
Copyright (c) 2017/2020 Thierry Paris. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Feature request:
I want to use the H-bridge BTS7960. It requires the DCC-signal and its inverse as input to create a proper DCC-output. I am currently using a special device to create the inverse signal, but it would be even more awesome if DCC++ could do this directly.
What would be required:
a way in the api to add another signal pin
obviously the signal generation at exactly the same time.
Until now, I failed to understand the code base properly to create a patch for myself, but I'll see whether I can come up with a patch in the next few weeks.
Hello!
I noticed that the project (as well as DCC++) uses 6 pins for DCC generation when in fact only 4 are needed for the motor shield. This is caused by usage of compare registers (as I remember) that disable usage of two extra pins. Also, 2 timers are used to control 2 tracks.
What I propose is to use only one timer (timer2 on atmega328) and digitalWrite-esque code inside timer ISR to control DCC signals on both tracks.
This allows to use any pins to connect to motor shield and frees one timer to do something else.
I've tested my code on Arduino Nano with L298 board and it works correctly. My changes are, however, made to DCC++ project (not DCCpp), which has not been modified for 4 years, therefore I propose a change here. I can try to port them to DCCpp if anyone is interested.
I'm trying to compile the provided examples (starting from MiniDcc) on IDE 1.8.13 but I get some errors:
libraries\DCCpp\src\Locomotives\Registers.cpp:10:27: error: 'MAXIMUM_REGISTER_SIZE' was not declared in this scope byte Registers::registers[MAXIMUM_REGISTER_SIZE / 8];
For each cpp file in \Locomotives subfolder I had to manually #import the corresponding hpp file to make it works...
Is it a recent change in how the compiler/linker work?