For testing I am using a signal generator. It creates a 5V signal, I convert it to 3.3v. Both signals are on this scope screen. Here the scope measures the frequency to be 125.6 hz. Using the cursors, I measure the frequency to be 126.3 hz.
Here is the screen of the CYD. Is is printing a new line every 10 seconds - can that time be reduced? And why is there so much variation in the numbers?
For my application, I am getting 8 pulses for every 2 rotations of the crank shaft, or 4 pulses per revolution. So multiplying the frequency by 15 would give me the RPM, which in this case should be 1890 (+/- 5).
I will now try the new code that has been posted.

