Arduino or sensor speed problems?

Are you missing pulses from the wheel sensor? or are you not moving from one sector to the next? If you are missing pulses you probably have a mechanical problem. At speed things are moving or vibrating.

I definitely agree that you should use if (wheelrevs >= xxx). If you get 2 pulses in the time it takes the Arduino to loop around you will miss the transition from one sector to another. 1800 RPM is 30 Hz, which means 33 mS between pulses. Arduino's are not very fast. You could very easily miss a pulse and the fact that it works at low speed, but not at high speed would support that theory.

You can correct for the extra pulses by keeping a running average of pulse time and subtracting out the extra pulses to get closer to your actual sector time.

Steve Turner

P.S. Should you be looking at LEDs and display while you are racing?