I had a very hard time figuring out how to use Pin-Change Interrupts. I found AVR documentation hard to follow, and Arduino libraries overly complicated and obfuscating. Here is an example of how to use pin-change interrupts for Arduino (mega). It may help.
PCICR |= 1; // enable PCI0 pin group interrupt
PCMSK0 |= 0b1100; // enable PC interrupts on arduino pins 50,51, which are in group PCI0
/// Pin-Change interrupt, for group PCI0 (arduino mega pins 13..10, and 50..53)
// do what you need to do when one of the pins in this group changes.
// usually... check to see which pin changed here... then do something.
Support Our Space
Tags3D-printer 3d printing 2600 air audio Bubonicon class classes crafting crowdfunding DIY event events gamenight general meeting hack hackerscouts hacknight Ignite Instructables inventables LED Linux Maker Faire makerscouts makezine marblebrewery meeting Meetings music NMTC potluck privacy Projects public night pyp recap robots space steampunk tcp/ip TechMas theme video Workshop