External interrupts numbers in Arduino Leonardo

Posted: [Source]
Tags:  arduino leonardo sensors

After spending many hours trying to run some code for different light sensors in an arduino Leonardo I've figured out that I was using digital pin 2 for interrupt 0, which works for both arduino Uno and Mega2560, while digital pin 3 should be used for Leornardo: http://arduino.cc/en/Reference/attachInterrupt