kopia lustrzana https://github.com/kosme/arduinoFFT
rodzic
8952252888
commit
690c071206
|
@ -63,6 +63,7 @@ void loop()
|
|||
{
|
||||
vReal[i] = int8_t((amplitude * (sin((i * (twoPi * cycles)) / samples))) / 2.0);/* Build data with positive and negative values*/
|
||||
//vReal[i] = uint8_t((amplitude * (sin((i * (twoPi * cycles)) / samples) + 1.0)) / 2.0);/* Build data displaced on the Y axis to include only positive values*/
|
||||
vImag[i] = 0.0; //Imaginary part must be zeroed in case of looping to avoid wrong calculations and overflows
|
||||
}
|
||||
/* Print the results of the simulated sampling according to time */
|
||||
Serial.println("Data:");
|
||||
|
|
|
@ -56,6 +56,7 @@ void loop()
|
|||
for(uint16_t i =0;i<samples;i++)
|
||||
{
|
||||
vReal[i] = double(analogRead(CHANNEL));
|
||||
vImag[i] = 0.0; //Imaginary part must be zeroed in case of looping to avoid wrong calculations and overflows
|
||||
if(samplingFrequency<=1000)
|
||||
delay(delayTime);
|
||||
else
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name=arduinoFFT
|
||||
version=1.2
|
||||
version=1.2.1
|
||||
author=kosme <enrique@shapeoko.com>
|
||||
maintainer=Enrique Condes <enrique@shapeoko.com>
|
||||
sentence=A library for implementing Fast Fourier Transform on Arduino.
|
||||
|
|
Ładowanie…
Reference in New Issue