Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:8c128e047ec9
- Child:
- 1:099f1a4c5fc8
diff -r 000000000000 -r 8c128e047ec9 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Mar 28 08:48:23 2017 +0000
@@ -0,0 +1,45 @@
+#include "mbed.h"
+#include "DFT.h"
+#include "LookupTables.h"
+#include "complexmath.h"
+#include <math.h>
+
+//TODO right values for the twiddle factors LUT equalizer LUT bitreverse LUT in LookupTables
+
+//TODO Build all functions in FFT.cpp
+
+//TODO fix main for a test wave and communication to serial
+
+Serial pc(USBTX, USBRX);
+float sampleDataIn [512];
+float sampleDataOut[512];
+int datalength = 512;//uitrekenen?
+
+int main()
+{
+ pc.baud(115200);
+ pc.printf ("building input:[");
+ for (int i=0; i<511; i++){
+ if (i%128<64){
+ sampleDataIn[i]=1000;
+ pc.printf ("%f,\t",sampleDatain[i]);
+ }
+ else{
+ sampleDataIn[i]=0;
+ pc.printf ("%f,\t",sampleDatain[i]);
+ }
+ sampleDataIn[511]=0;
+ pc.printf("%f]\r\n",sampleDataOut[511]);
+ performEqualizer(&sampleDataIn, &sampleDataOut,datalength);
+ pc.printf ("Equalized data :[");
+ for (int i=0; i<511; i++) {
+ pc.printf ("%f,\t",sampleDataOut[i]);
+ }
+ pc.printf("%f]\r\n",sampleDataOut[511]);
+ while(1) {
+ }
+
+
+
+
+}
\ No newline at end of file