(Before all, I'm sorry for my bad English)

Hello, guys. I'm just a beginner on Arduino but I have a little question.

I'm studying Arduino to make a ECG platform. My reference source is: Physionet Database.

The float values are on the EEPROM.

I have a piece of code that perform (I think) FFT in double values.

To have sure about the code, I need to perform IFFT in the result of the operation.

#include <EEPROM.h>

#include "arduinoFFT.h"

#define SAMPLES 512

#define SAMPLING_FREQUENCY 1000

unsigned int sampling_period_us;

unsigned long microseconds;

double vReal[SAMPLES];

double vImag[SAMPLES];

arduinoFFT FFT = arduinoFFT();

void setup(){

Serial.begin(9600);

while (!Serial){

;

}

}

void loop(){

int eepromAdd = 0;

for(int i=0; i<SAMPLES; i++){

microseconds = micros();

vReal[i] = EEPROM.get(eepromAdd, vReal[i]);

vImag[i]=0;

eepromAdd += sizeof(float);

}

FFT.Windowing(vReal, SAMPLES, FFT_WIN_TYP_HAMMING, FFT_FORWARD);

FFT.Compute(vReal, vImag, SAMPLES, FFT_FORWARD);

FFT.ComplexToMagnitude(vReal, vImag, SAMPLES);

double peak = FFT.MajorPeak(vReal, SAMPLES, SAMPLING_FREQUENCY);

for(int i=0; i<SAMPLES; i++){

//Serial.print((i * 1.0 * SAMPLING_FREQUENCY) / SAMPLES, 1);

//Serial.print(" ");

Serial.println(vReal[i], 3 );

}

while(1);

} //end loop

Can anyone help me to find a way to perform IFFT in double values?