Pinchange Interrupt Pins:Digital Pin 0,22,23,24,25,10,11,12,13,15,14Analog Pin 6,7,8,9,10,11,12,13,14,15This pin is used for pin change interrupt. Enable bit of pinchange interrupt must be set with global interrupt enable.Application :Rotary encoder, push button based interrupt and others.Example :pinMode(0, OUTPUT);pinMode(1, INPUT_PULLUP);attachInterrupt(digitalPinToInterrupt(1), LOW, CHANGE);
the guy who wrote the code needed that library because the UNO has 2 hardware interrupt pins. the Mega has 21. from Arduino Mega Tutorialremove that PinChangeInterrupt library and use hardware interrupts
External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2). These pins can be configured to trigger an interrupt on a low level, a rising or falling edge, or a change in level. See the attachInterrupt() function for details.
I would try to help but I can't run the IDE on my device and am reluctant to download code. If you post your code as described in the how to use this forum-please read stickies, everyone can see the code and, perhaps, offer assistance.