Mark
I have added Serial.print of rpmcount before
Serial.print("rpm ");
Serial.println(rpm,DEC);
and get 20 every time
I am a bit thick, what are 3 different errors in the line
rpm =60000000/(micros() - timeold)*20;
I did Serial.print() micros()-timeold and got 491060 micros which divided 60000000 by 60000000/491060=122.1846 and then multiplied by 20 = 2443 arduino gave me 2442
Tim