Using Hall Sensor(TLE-4905) with Arduino Mega

Hi again cattledog! For your code ..... I decided to try 1 millisecond count duration.... ie count period set to '1'. And I set the tone function to 50000 .... ie. 50 kHz squarewave (tone function set to '50000').

The expected number of captured pulses is 50 (in a 1 millisecond duration), and the output counts seen in serial monitor are approximately 70...... much higher than 50. I think I have to look at the waveform on the oscilloscope to check that first.

The code works nicely with 2 second count duration (ie. 2000 millisecond count period) and 50 pulses per sec from tone generator (using the tone function set to '50')!