I have made a sketch using the FreqMeasure Library with Arduino Uno to read frequencies from a GB-212 square waves generator. The library show good results but for low frequencies, mainly under 100 Hz or 200 Hz the latency is high for my project (over 1000 ml or what is the same 1 sec). To solve this problem I have changed my sketch and now for frequencies under 100Hz I’m only counting 5 times before calculate the frequency, and for frequencies > 100Hz maintain the 30 mediations before get the frequency. Here is the table with my results:
|Count of measurements:||5 for Frec <= 100Hz and 30 for > 100Hz|
|Freq generator GB-212 (Hz)||CPU clock cycles|
I think the frequency calculations are quite accurate and latency acceptable. My question is, There are a better way to get good result with low latency? Something more efficient, or any kind of configuration in the library ? Any answer will be welcome…….