user874: I have an Arduino Uno R3. I have a paddlewheel waterspeed sensor that I use on an ISR on pin 2. The power supply is approximately 8v stepped down to 4.92v with a circuit yanked from the phone charger. I have also tried this with the arduino 5v.
The pin returns the correct values with digitalRead(), so it's cycling between 1 and 0.
The ISR works fine on pin3. Why does it work on pin 3 and not pin 2 ISR?
void itest() {
    Serial.println( "test" );
}

void setup() {
    attachInterrupt(0, itest, FALLING);
}


user643: never use Serial inside an interrupt handler, increment a (volatile) variable and print it in the loop().

874: <p>I have an Arduino Uno R3. I have a paddlewheel waterspeed sensor that I use on an ISR on pin 2. The power supply is approximately 8v stepped down to 4.92v with a circuit yanked from the phone charger. I have also tried this with the arduino 5v.</p>

<p>The pin returns the correct values with digitalRead(), so it's cycling between 1 and 0.</p>

<p>The ISR works fine on pin3. Why does it work on pin 3 and not pin 2 ISR?</p>

<pre><code>void itest() {
    Serial.println( "test" );
}

void setup() {
    attachInterrupt(0, itest, FALLING);
}
</code></pre>
 643: <p>never use Serial inside an interrupt handler, increment a (volatile) variable and print it in the loop().</p>
