Giter VIP home page Giter VIP logo

dccpp's People

Contributors

positron96 avatar trusty77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dccpp's Issues

Bugs in beginProgMotorShield, beginProgPololu

Hi,
I think that code in DCCpp.hpp has two bugs:

  • definition of beginProgMotorShield() should call beginProg instead of beginMain
  • definition of beginProgPololu() should call beginProg instead of beginMain

I've tried with an Arduino Motor Shield v3, and programming track (B) only works if beginProgMotorShield calls beginProg.

Add inverse signal pin feature

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.

Thanks & merci!

Use only one timer to bitbang DCC

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.

IDE 1.8.13, can't compile examples

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.