Ok. I am totally lost and dont know how to move forward.
I have a Adafruit MAX4466 MIC connected to A0 power to 3 v and then ground cable...
I tried the Example and it freezes in the Setup() on the row meter.begin(A0, 960000);
I have Serial.printf before and after... i only get the first...
The code below only prints out "Start" nothing else happens
#include <AudioFrequencyMeter.h>
AudioFrequencyMeter meter;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Start");
// meter.setBandwidth(70.00, 1500); // Ignore frequency out of this range
meter.begin(A0, 960000); // Intialize A0 at sample rate of 45kHz
Serial.println("adde");
}
void loop() {
// put your main code here, to run repeatedly:
float frequency = meter.getFrequency();
if (frequency > 0)
{
Serial.print(frequency);
Serial.println(" Hz");
}
}
It seems that you're trying to set a sample rate of almost 1MHz (960000Hz), which is a lot knowing the library is made to measure up to 1.5KHz. Even if it is what's in the example, it may be an error : this page indicate that the second parameter is the sample rate in Hz...
Maybe try to reduce it to something like 15000, that should be enough.
I hope it is that easy, will try when i get home from work.... I will report back here, maybe somone then could update the Exampel sketch and code on webpage....