GithubHelp home page GithubHelp logo

Comments (4)

siteswapjuggler avatar siteswapjuggler commented on September 9, 2024

Ok some investigation later :

  • commenting #define INT_vect lines in the header file make the compilation ok (I did not test the functionnal aspect as I debug this remotely for a friend without hardware to test it).

  • seems like the interrupt method used in void dimmerLamp::ext_int_init(void) is not compatible with the Arduino standard which use attachInterrupt to keep track of the different IST method associated to each interrupt pins.

  • doing so the ISR(INT_vect) come in conflic with the core library

I will try some fixes but I will not have so much time to work on it correctly. This error could be common with other open issues so I hope it will help someone to correct it at one point :)

from rbddimmer.

siteswapjuggler avatar siteswapjuggler commented on September 9, 2024

Replacing content of ext_int_init by attachInterrupt(INTx,ISR_RBD,RISING); should do the trick. You will also have to declare ISR function befor ext_int_init and change ISR name by ISR_RBD.

from rbddimmer.

blackbird257 avatar blackbird257 commented on September 9, 2024

Hi! , thank you for the research of the library issue. I have same issue with the interruptions (I use another device on port D3).
I'm trying to follow your advices, but I don't exactly know how to "declare ISR function before ext_int_init" - I just copied it before ext_int_init and renamed it to ISR_RBD. I get this error:
/mnt/create-efs/webide/16/d4/16d4ee6b75059aa8801ddf6d27b06fde:lubos257/libraries_v2/RBDdimmer/src/avr/RBDmcuAVR.cpp:80:8: error: expected constructor, destructor, or type conversion before '(' token

ISR_RBD(INT_vect)

^

/mnt/create-efs/webide/16/d4/16d4ee6b75059aa8801ddf6d27b06fde:lubos257/libraries_v2/RBDdimmer/src/avr/RBDmcuAVR.cpp: In member function 'void dimmerLamp::ext_int_init()':

/mnt/create-efs/webide/16/d4/16d4ee6b75059aa8801ddf6d27b06fde:lubos257/libraries_v2/RBDdimmer/src/avr/RBDmcuAVR.cpp:92:23: error: 'ISR_RBD' was not declared in this scope

attachInterrupt(INTx,ISR_RBD,RISING);

Could you be more specific with "declare ISR function before ext_int_init" ,
2. question, down in the code of ccp file is also anothre ISR function: ISR (TIMER_COMPA_VECTOR(DIMMER_TIMER))
, should I rename also that one?
Sorry for stupid questions, I'm beginner with programming.

from rbddimmer.

siteswapjuggler avatar siteswapjuggler commented on September 9, 2024

Well by replacing the normal content of ext_int_init activate the function which implicitely link to

ISR(INT_vect)
{
for (int i = 0; i < current_dim; i++ )
if (dimState[i] == ON)
{
zeroCross[i] = 1;
}
}

By changing it to attachInterrupt(INTx,ISR_RBD,RISING); the link become explicit so you can replace the previous function by

ISR_RBD()
{
for (int i = 0; i < current_dim; i++ )
if (dimState[i] == ON)
{
zeroCross[i] = 1;
}
}

But then you need to declare it (move it) befor the declaration of ext_int_init ;)

from rbddimmer.

Related Issues (20)

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.