Author Topic: Yes, pin change interrupt discussion again  (Read 8314 times)

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Yes, pin change interrupt discussion again
« on: April 06, 2020, 10:08:09 AM »
Folks, I've been reading posts, downloading code and struggling for the last 4-5 hours.  I'm trying to implement pin change interrupts on the Moteino Mega.  I have an Adafruit GPS using hardware Serial1 (pins 10 & 11) and of course an RFM69 radio using INT2.  The ugly part comes in when I'm trying to use a limit switch to trigger a wakeup from SLEEP_FOREVER.  I've tried multiple libraries, including EnableInterrupt and PinChangeInt.  Either they fail to compile (I even tried the #define trick which allowed EnableInterrupt to compile but couldn't find the enable and disable function calls), or they don't work.

I'm also using a HTU21D Temp/Humidity and a Adafruit GA1A12S202 light sensor.  Each of these work without issue.

So folks, what is the latest approach to getting pin change interrupts to work on a Moteino Mega?  Hopefully, after a number of years, this process has become easier to understand.

I'll be happy to post my code if it's needed to further explain what I'm trying to do.