kopia lustrzana https://github.com/kosme/arduinoFFT
Merge branch 'develop' into master
commit
909240fe79
|
@ -58,6 +58,7 @@ ArduinoFFT<double> FFT = ArduinoFFT<double>(vReal, vImag, samples, samplingFrequ
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
while(!Serial);
|
||||||
Serial.println("Ready");
|
Serial.println("Ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ unsigned long startTime;
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
while(!Serial);
|
||||||
Serial.println("Ready");
|
Serial.println("Ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ void setup()
|
||||||
{
|
{
|
||||||
sampling_period_us = round(1000000*(1.0/samplingFrequency));
|
sampling_period_us = round(1000000*(1.0/samplingFrequency));
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
while(!Serial);
|
||||||
Serial.println("Ready");
|
Serial.println("Ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
of each of the frequencies that compose the signal are calculated. Finally,
|
of each of the frequencies that compose the signal are calculated. Finally,
|
||||||
the frequency spectrum magnitudes are printed. If you use the Arduino IDE
|
the frequency spectrum magnitudes are printed. If you use the Arduino IDE
|
||||||
serial plotter, you will see a single spike corresponding to the 1000 Hz
|
serial plotter, you will see a single spike corresponding to the 1000 Hz
|
||||||
frecuency.
|
frequency.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "arduinoFFT.h"
|
#include "arduinoFFT.h"
|
||||||
|
@ -58,6 +58,8 @@ ArduinoFFT<double> FFT = ArduinoFFT<double>(vReal, vImag, samples, samplingFrequ
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
while(!Serial);
|
||||||
|
Serial.println("Ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
|
|
|
@ -59,6 +59,7 @@ ArduinoFFT<double> FFT = ArduinoFFT<double>(vReal, vImag, samples, samplingFrequ
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
while(!Serial);
|
||||||
Serial.println("Ready");
|
Serial.println("Ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +89,7 @@ void loop()
|
||||||
PrintVector(vReal, (samples >> 1), SCL_FREQUENCY);
|
PrintVector(vReal, (samples >> 1), SCL_FREQUENCY);
|
||||||
double x;
|
double x;
|
||||||
double v;
|
double v;
|
||||||
FFT.majorPeak(x, v);
|
FFT.majorPeak(&x, &v);
|
||||||
Serial.print(x, 6);
|
Serial.print(x, 6);
|
||||||
Serial.print(", ");
|
Serial.print(", ");
|
||||||
Serial.println(v, 6);
|
Serial.println(v, 6);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Datatypes (KEYWORD1)
|
# Datatypes (KEYWORD1)
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
ArduinoFFT KEYWORD1
|
ArduinoFFT KEYWORD1
|
||||||
|
|
|
@ -27,5 +27,6 @@
|
||||||
],
|
],
|
||||||
"version": "2.0",
|
"version": "2.0",
|
||||||
"frameworks": ["arduino","mbed","espidf"],
|
"frameworks": ["arduino","mbed","espidf"],
|
||||||
"platforms": "*"
|
"platforms": "*",
|
||||||
|
"headers": "arduinoFFT.h"
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue