Hello all,
I have been using the mappings provided here: Arduino mega, using pins that are not mapped. - Suggestions for the Arduino Project - Arduino Forum
In order to make full use of the chip, and the map seems to be working fine for basic read/write functionality. But I am trying to get interrupts working on the extra pins.
I added:
#define digitalPinToInterrupt(p) (p == 2 ? 0\
: (p == 3 ? 1\
: (p == 18 ? 5\
: (p == 19 ? 4\
: (p == 20 ? 3\
: (p == 21 ? 2\
: (P == 81 ? 6\
: (p == 82 ? 7\
: NOT_AN_INTERRUPT))))))))
I also used the following code to initialize the newly mapped pin 82:
pinMode(82, INPUT); // set pin to input
digitalWrite(82, HIGH); // turn on pullup resistors
attachInterrupt(82, blink, FALLING);
but my function blink never gets called if I am using any of the new pins.
Any ideas?
Thanks!