Elektronikprojekt Grupp 13 / Mbed OS test_fft_grp13

Dependencies:   mbed-dsp

Fork of mbed-os-example-blinky by Elektronikprojekt Grupp 13

main.cpp

Committer:
deeza
Date:
2017-04-10
Revision:
55:360b5bcdf9a7
Parent:
54:fd99c80c68da
Child:
57:d15ff81fbeeb

File content as of revision 55:360b5bcdf9a7:

#include "mbed.h"

const int FFT_SIZE = 32;
int sampleCounter;

void samplingBegin(){
    sampleCounter = 0;
}

void samplingCallback() {
    //read sample from our created test data
    samples[sampleCounter] = testData[sampleCounter];
    // sätter imaginär till 0
    samples[sampleCounter + 1] = 0.0;
    sampleCounter += 2;
    if (sampleCounter >= FFT_SIZE *2 ) {
        //här är sampling klar, buffert är full
        //skriv kod här   
}    

bool samplingIsDone() {
    //return true;
}

// main() runs in its own thread in the OS
int main() {
 
}