Hello,
I am a bit confused about the pins for interrupting with Arduino Mega 2560 R3 board. I need only one interrupt for my flow sensor. Examples show interrupt 0 and pin 2, so the part of the code would be :
byte FM_1_Interrupt = 0; // 0 = digital pin 2
// and in the void setup
void setup(){
// The Hall-effect sensor is connected to pin 2, which uses interrupt 0.
// Configured to trigger on a FALLING state change (transition from HIGH state to LOW state)
attachInterrupt(digitalPinToInterrupt(2), FM_1_PulseCount, FALLING);
here interrupt 0 triggers by pin 2 while the pinout diagram shows pin 21 for INT0.
Would you please clarify?
Thanks
