-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timerMs corrupts readings #7
Comments
I have a similar problem. |
davidllpz, |
I added some 'correction' code so any integer works for timerMs ''' #include "FreqCountESP.h" int inputPin = 14; // slight mod so that any number can be used for timerMs, the original library only shows hz when it is set to 1000 void setup() void loop()
} |
If you guys are reading a stable signal, you should be seeing my problem. Set your signal generator to something like 10.0000MHz. |
Reads 25MHz with timerMs = 1000 and 100. Other values corrupts the value of frequency.
#include "FreqCountESP.h"
void setup()
{
int inputPin = 14;
int timerMs = 100;
FreqCountESP.begin(inputPin, timerMs);
Serial.begin(115200);
}
void loop()
{
if (FreqCountESP.available())
{
uint32_t frequency = FreqCountESP.read();
Serial.println(frequency);
// Do something with the frequency...
}
}
The text was updated successfully, but these errors were encountered: