hello, i need help to connect this board with the bluetooth module HC-05. This is the code I'm using. I can only compile if I use SerialUSB. Any tips on how to resolve it? I've tried using the ArduinoBLE library, but without success.
#include <AudioFrequencyMeter.h>
#include <SerialCommand.h>
AudioFrequencyMeter meter;
void setup() {
SerialUSB.begin(115200);
SerialUSB.println("started");
//Bluetooth
Serial1.begin(115200);
meter.setBandwidth(50, 200); // Ignore frequency out of this range
meter.begin(A1, 5000); // Initialize A0 at sample rate of 45 kHz
}
void loop() {
float frequency = meter.getFrequency();
if (frequency > 0)
{
SerialUSB.print(frequency); SerialUSB.println(" Hz");
Serial1.print(frequency); Serial1.println(" ");
Serial1.write(frequency); SerialUSB.write(" Hz");
//SerialUSB.println("-");
}
delay(100);
}
@gleonn, why did you move your topic back to Installation and Troubleshooting?
At the moment that you can upload a sketch, it has nothing to do with Installation and Troubleshooting !! If you don't agree on the category that I picked, move it somewhere else. But please move it out of Installation and Troubleshooting, else somebody will do it.