locoduino / dccpp Goto Github PK
View Code? Open in Web Editor NEWThis is the library version of DCC++ for Arduino, to control railroading DCC devices.
Home Page: http://www.locoduino.org
License: GNU General Public License v2.0
This is the library version of DCC++ for Arduino, to control railroading DCC devices.
Home Page: http://www.locoduino.org
License: GNU General Public License v2.0
Hi,
I think that code in DCCpp.hpp has two bugs:
I've tried with an Arduino Motor Shield v3, and programming track (B) only works if beginProgMotorShield calls beginProg.
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:
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.
Thanks & merci!
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.
Hi!
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?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.