Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. GreyGnome
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by GreyGnome

    • RE: Multiple interrupts

      Hello, GreyGnome here. Glad to see the library is helping you. Sorry to see you had to edit code.

      In the next upcoming release I will include compiler directives that allow you to comment out conflicting interrupts.

      Also, as someone else mentioned- don't use attachInterrupt() together with EnableInterrupt(). It just makes the code fatter, and EnableInterrupt() can already cover both interrupt types; eg on an Arduino Uno:

      enableInterrupt(2, myFunkyExternalInterruptFunction, LOW);
      enableInterrupt(10, myExcellentPinChangeInterruptFunction, CHANGE);

      ...note that enableInterrupt will use External interrupts on pin 2 by default. You can force it to use pin change interrupts:

      enableInterrupt(2 | PINCHANGEINTERRUPT, myFunkyExternalInterruptFunction, FALLING);

      ...in which case, "myFunkyExternalInterruptFunction" is something of a misnomer. ALSO NOTE: Pin Change Interrupts do not support the LOW state!

      posted in General Discussion
      GreyGnome
      GreyGnome