Help: debug two attachInterrupt(). Is there a limitation??

Hello

First: I am a beginner. I've only used Arduino for two weeks.

I've started to program a Arduino to read the revolutions of a wheel on the right side and left side of a wagon.

I use attachInterrupt() to receive the pulse from the wheel. So I use both interrupts on my uno.

In order to work inside, I have created a function testPulse(int time) to simulating a rotating wheel. I have on the board connected Pin 7 to Pin 2 with a wire.

But something goes wrong. If I give a pulse on PIN2 (int0), 1 should be added to revolutionsV. But it also adds 1 to revolutionsH. This should only happen if there were a pulse on pin3 (int1). :~

What goes wrong? Is there is a limitation I not familiar with??

volatile byte revolutionsH; // stores the number of revolutions
volatile byte revolutionsV; // stores the number of revolutions

int testPulsePIN = 7;

void setup()
{

  Serial.begin(9600);
  pinMode(testPulsePIN,OUTPUT);
  attachInterrupt(1, rpmH, RISING); // INT0 = Pin 2 og INT1 = Pin 3
  attachInterrupt(0, rpmV, RISING); // INT0 = Pin 2 og INT1 = Pin 3

  revolutionsH = 0; //number of revolutions at start
  revolutionsV = 0; //number of revolutions at start
  
}

void loop()
{  
  testPulse(100); //simulation rotating wheel

  Serial.print(revolutionsH);
  Serial.print("\t");
  Serial.println(revolutionsV);
}

void rpmH() //adds one revolution
{
  revolutionsH++;
}

void rpmV() //adds one revolution
{
  revolutionsV++;
}

void testPulse(int time) 
{
  digitalWrite(testPulsePIN, HIGH);   
  delay(2);                  
  digitalWrite(testPulsePIN, LOW);    
  delay(time);
}

If Pin 3 is left open/floating it is possible that a signal on the adjacent Pin 2 is leaking in. Try connecting Pin 3 to Ground.

It worked!! BUT I need to use both the interrupts, since I have two wheels that I need to count revolutions on. So how do I do this? Is my card broken or is "leaking" a typical error?

Is my card broken or is "leaking" a typical error?

"leaking" is not. Floating pins are. If a pin is not explicitly grounded, and nearby voltage, as in that to an adjacent pin, can influence how it is read.