Looking for a better frequency counter library

I don't know if this will help or not but I wrote this after reading Nick Gammon's articles on counter and interrupts.

In this, I used the 'micros()' function. This is not very accurate. It is not as accurate as dedicating a timer to the purpose. However it is much more simple. In an effort to compensate for it lack of accuracy I adjust the sample size. Sort of an auto-scaling.

It is rather simple. It uses all standard Arduino library functions. I did use version 1.01 RC2 for my IDE so the code may not compile with older IDEs. I did comment most of the code, but let me know if you have any question.

Simple_Freq_Counter.zip (1.57 KB)