xsa

Dependencies:   mbed ADXL345 CMSIS_DSP_5

Revision:
0:4d6a495f372c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jul 09 21:55:41 2020 +0000
@@ -0,0 +1,440 @@
+#include "mbed.h"
+
+#include "math.h"
+#include "arm_math.h" 
+#include "ADXL345.h"
+#define NUM_SAMPLES    2048
+
+ADXL345 accelerometer(PB_5, PB_4, PB_3, PG_11);
+Ticker flipper1;
+Serial pc(SERIAL_TX, SERIAL_RX,115200);
+Ticker flipper2;
+
+DigitalOut led(LED1);
+DigitalOut led2(LED2);
+int readings[3] = {0, 0, 0};
+int x[10000];
+float fs=400;
+float nnn=2048;
+float avgx=0;
+float N=NUM_SAMPLES;
+float df=fs/N;
+float sumx[8]={0,0,0,0,0,0,0,0};
+float sumy[8]={0,0,0,0,0,0,0,0};
+float sumz[8]={0,0,0,0,0,0,0,0};
+
+int y[10000];
+int z[10000];
+q31_t left[NUM_SAMPLES];
+q31_t meanx=0;
+q31_t leftComplex[2*NUM_SAMPLES];
+q31_t leftFFT[2*NUM_SAMPLES];
+float auxFloat[2*NUM_SAMPLES];
+q31_t leftFFTAbs[NUM_SAMPLES];
+q31_t   right[NUM_SAMPLES];
+q31_t xxx[NUM_SAMPLES];
+int xxx1[NUM_SAMPLES];
+
+q31_t *poi ;
+//poi=(q31_t *)xxx;
+
+q31_t  yyy[NUM_SAMPLES];
+q31_t  zzz[NUM_SAMPLES];
+
+int i,j,k=0;
+int v=0;
+
+float sum11=0;
+float avg = 0; 
+float avg1 = 0;
+int avg2 = 0;
+int sum1=0;
+float sum2=0;
+
+void flip1() {        // flip 1 function
+        accelerometer.getOutput(readings);
+        x[i]=readings[0];
+        y[i]=readings[1];
+        z[i]=readings[2];
+        i++;
+}
+
+ //foo = &xxx;
+ 
+
+ 
+void flip2() {
+        
+    if(i>2048 && v==0)
+                {
+        led=1;
+        for(int jj=0;jj<2048;jj++)
+                   {
+                        xxx[jj]=x[jj];
+                        xxx1[jj]=x[jj] ;
+                        yyy[jj]=y[jj];
+                        zzz[jj]=z[jj]; 
+                    }
+        //forwardStepDaub(xxx1,4);
+             //arm_mean_q31(xxx,2048,meanx);
+         
+             
+             
+             ///float ab=0.0004882;
+             //float sum2[1]={0};
+   //int num = 2048;
+       //arm_q31_to_float (xxx, xxx1, 2048);
+
+      //avg = (sum/2048); 
+//   
+//    for(int jj=0;jj<2048;jj++)
+//                   {
+//                        xxx[jj]=xxx[jj]-avg; 
+//                         
+//                    }
+                    
+                    
+   
+     
+                    i=0;
+                    for(int nn=0;nn<2048;nn++)
+                    {
+                        pc.printf("%i ,",(int16_t)xxx[nn]);            
+                    }  
+                    
+                     for(int nn=0;nn<2048;nn++)
+                    {
+                        pc.printf("%i ,",(int16_t)yyy[nn]);            
+                    }  
+                     for(int nn=0;nn<2048;nn++)
+                    {
+                        pc.printf("%i ,",(int16_t)zzz[nn]);            
+                    }  
+                    
+            //xfft        
+arm_rfft_instance_q31 Sfft;
+ arm_rfft_init_q31(&Sfft, NUM_SAMPLES, 0, 1);          
+         arm_rfft_q31 (&Sfft, xxx, leftFFT);
+         arm_q31_to_float (leftFFT, auxFloat, 2*NUM_SAMPLES); // doing abs is very sensitive to rounding, better to be done in float
+         arm_cmplx_mag_f32 (auxFloat, auxFloat, NUM_SAMPLES);
+         arm_float_to_q31 (auxFloat, left, NUM_SAMPLES);
+         int rr=0;
+         int count;
+         i=0;
+                    for (int uu=0;uu<1024;uu++)
+                    {
+                        pc.printf("%i  ,",left[uu]);
+                           
+                    } 
+                    i=0;
+  
+//                    for (int pp=0;pp<128;pp++)
+//                    {
+//                     sumx[0]=((left[pp]+left[pp+1])*(df/2))+sumx[0];
+//                     }  
+//                     
+//                     for (int pp=128;pp<256;pp++)
+//                    {
+//                     sumx[1]=((left[pp]+left[pp+1])*(df/2))+sumx[1];
+//                     }  
+//                     
+//                     for (int pp=256;pp<384;pp++)
+//                    {
+//                     sumx[2]=((left[pp]+left[pp+1])*(df/2))+sumx[2];
+//                     }  
+//                     
+//                     for (int pp=384;pp<512;pp++)
+//                    {
+//                     sumx[3]=((left[pp]+left[pp+1])*(df/2))+sumx[3];
+//                     }  
+//                     
+//                     for (int pp=512;pp<640;pp++)
+//                    {
+//                     sumx[4]=((left[pp]+left[pp+1])*(df/2))+sumx[4];
+//                     }  
+//                     
+//                     
+//                     
+//                     for (int pp=640;pp<768;pp++)
+//                    {
+//                     sumx[5]=((left[pp]+left[pp+1])*(df/2))+sumx[5];
+//                     }  
+//                     
+//                     for (int pp=768;pp<896;pp++)
+//                    {
+//                     sumx[6]=((left[pp]+left[pp+1])*(df/2))+sumx[6];
+//                     }  
+//                     
+//                     for (int pp=896;pp<1023;pp++)
+//                    {
+//                     sumx[7]=((left[pp]+left[pp+1])*(df/2))+sumx[7];
+//                     }  
+             
+               //      
+//                for (int pp=0;pp<1;pp++)
+//                    {
+//                     sumx[7]=left[0]*ab+0;
+//                     }  
+//                           
+                     
+                     
+                    /* for(int uu=127;uu<1024;uu=uu+128)
+                           { 
+                           count=uu;
+                           for(int pp=count-127;pp<(count);pp++)
+                           {
+                               sumz[rr]=((left[pp]+left[pp+1])*(df/2))+sumz[rr];
+                               rr++;
+                               }
+                           
+                            }  
+                      */      
+
+//yfft
+i=0;
+arm_rfft_instance_q31 Sffty;
+ arm_rfft_init_q31(&Sffty, NUM_SAMPLES, 0, 1);          
+         arm_rfft_q31 (&Sffty, yyy, leftFFT);
+         arm_q31_to_float (leftFFT, auxFloat, 2*NUM_SAMPLES); // doing abs is very sensitive to rounding, better to be done in float
+         arm_cmplx_mag_f32 (auxFloat, auxFloat, NUM_SAMPLES);
+         arm_float_to_q31 (auxFloat, left, NUM_SAMPLES);
+                    rr=0;
+         i=0;
+                    for (int uu=0;uu<1024;uu++)
+                    {
+                        pc.printf("%i  ,",left[uu]);
+                           
+                    }   
+                    
+                     for (int pp=0;pp<128;pp++)
+                    {
+                     sumy[0]=((left[pp]+left[pp+1])*(df/2))+sumy[0];
+                     }  
+                     
+                     for (int pp=128;pp<256;pp++)
+                    {
+                     sumy[1]=((left[pp]+left[pp+1])*(df/2))+sumy[1];
+                     }  
+                     
+                     for (int pp=256;pp<384;pp++)
+                    {
+                     sumy[2]=((left[pp]+left[pp+1])*(df/2))+sumy[2];
+                     }  
+                     
+                     for (int pp=384;pp<512;pp++)
+                    {
+                     sumy[3]=((left[pp]+left[pp+1])*(df/2))+sumy[3];
+                     }  
+                     
+                     for (int pp=512;pp<640;pp++)
+                    {
+                     sumy[4]=((left[pp]+left[pp+1])*(df/2))+sumy[4];
+                     }  
+                     
+                     
+                     
+                     for (int pp=640;pp<768;pp++)
+                    {
+                     sumy[5]=((left[pp]+left[pp+1])*(df/2))+sumy[5];
+                     }  
+                     
+                     for (int pp=768;pp<896;pp++)
+                    {
+                     sumy[6]=((left[pp]+left[pp+1])*(df/2))+sumy[6];
+                     }  
+                     
+                     for (int pp=896;pp<1023;pp++)
+                    {
+                     sumy[7]=((left[pp]+left[pp+1])*(df/2))+sumy[7];
+                     }   
+                    
+                  /*  for(int uu=127;uu<1024;uu=uu+128)
+                           { 
+                           count=uu;
+                           for(int pp=count-127;pp<(count);pp++)
+                           {
+                               sumz[rr]=((left[pp]+left[pp+1])*(df/2))+sumz[rr];
+                               rr++;
+                               }
+                           
+                            } */ 
+                            i=0;
+   //zfft      
+arm_rfft_instance_q31 Sfftz;
+ arm_rfft_init_q31(&Sfftz, NUM_SAMPLES, 0, 1);          
+         arm_rfft_q31 (&Sfftz, zzz, leftFFT);
+         arm_q31_to_float (leftFFT, auxFloat, 2*NUM_SAMPLES); // doing abs is very sensitive to rounding, better to be done in float
+         arm_cmplx_mag_f32 (auxFloat, auxFloat, NUM_SAMPLES);
+         arm_float_to_q31 (auxFloat, left, NUM_SAMPLES);                                          
+    i=0;                
+                    //arm_rfft_fast_instance_f64 Sfft;
+                    //arm_rfft_fast_init_f64(&Sfft, NUM_SAMPLES);
+
+                    //arm_rfft_fast_f32 (&Sfft, xxx, leftFFT,0);
+                    //arm_cmplx_mag_f32 (leftFFT, right, NUM_SAMPLES);
+                       rr=0;
+         
+                    for (int uu=0;uu<1024;uu++)
+                    {
+                        pc.printf("%i  ,",left[uu]);
+                         
+                    }   
+                    
+                     for (int pp=0;pp<128;pp++)
+                    {
+                     sumz[0]=((left[pp]+left[pp+1])*(df/2))+sumz[0];
+                     }  
+                     
+                     for (int pp=128;pp<256;pp++)
+                    {
+                     sumz[1]=((left[pp]+left[pp+1])*(df/2))+sumz[1];
+                     }  
+                     
+                     for (int pp=256;pp<384;pp++)
+                    {
+                     sumz[2]=((left[pp]+left[pp+1])*(df/2))+sumz[2];
+                     }  
+                     
+                     for (int pp=384;pp<512;pp++)
+                    {
+                     sumz[3]=((left[pp]+left[pp+1])*(df/2))+sumz[3];
+                     }  
+                     
+                     for (int pp=512;pp<640;pp++)
+                    {
+                     sumz[4]=((left[pp]+left[pp+1])*(df/2))+sumz[4];
+                     }  
+                     
+                     
+                     
+                     for (int pp=640;pp<768;pp++)
+                    {
+                     sumz[5]=((left[pp]+left[pp+1])*(df/2))+sumz[5];
+                     }  
+                     
+                     for (int pp=768;pp<896;pp++)
+                    {
+                     sumz[6]=((left[pp]+left[pp+1])*(df/2))+sumz[6];
+                     }  
+                     
+                     for (int pp=896;pp<1023;pp++)
+                    {
+                     sumz[7]=((left[pp]+left[pp+1])*(df/2))+sumz[7];
+                     }  
+                    
+                    
+                    
+   for(int iii = 0; iii < 2048; iii++)
+      {
+      sum1 = xxx1[iii]+sum1;
+     }
+     
+     sum2=(sum1*100)/2048;
+     double sum3=0;
+     double ab=3000/2048;
+     sum3=floor(sum2);
+     sum11=3000/2048;
+     //sum22[0]=sum1*df;
+      //sum11=static_cast<float>(sum1);
+//      avg = static_cast<float>(sum1)*0.004882; 
+//      avg1 = avg*100;
+//      avg2 = static_cast<int>(avg1);
+//                    
+                    
+                 
+                    for(int ww=0;ww<8;ww++)
+                    {
+                        pc.printf("%f ,",sumx[ww]);
+                        
+                        }
+                        for(int ww=0;ww<8;ww++)
+                    {
+                        pc.printf("%f ,",sumy[ww]);
+                        
+                        }
+                        
+                        for(int ww=0;ww<8;ww++)
+                    {
+                        pc.printf("%f ,",sumz[ww]);
+                        
+                        }
+                         
+                         for(int nn=0;nn<2048;nn++)
+                    {
+                        pc.printf("%i ,",(int16_t)xxx1[nn]);            
+                    }  
+                    
+                
+                    
+                    
+                    //pc.printf("%i ,",(int16_t)sum1);
+                    //pc.printf("%i ,",(int16_t)sum1);
+//                    pc.printf("%.2f ,",(float)sum1);
+//                    pc.printf("%i ,",(int64_t)sum2);
+//                    pc.printf("%i ,",(int16_t)sum3);
+
+                      pc.printf("%i ,",(int16_t)sum11);
+                      pc.printf("%f ,",sum11);
+                      pc.printf("%f ,",(float)sum11);
+                      
+                      pc.printf("%i ,",(int16_t)ab);
+                      pc.printf("%f ,",ab);
+                      pc.printf("%f ,",(float)ab);
+
+                   //pc.printf("%.2f ,",(float64_t)sum11);
+                //
+//                    pc.printf("%f ,",avg);
+//                    pc.printf("%f ,",(float)avg);
+//                    pc.printf("%i ,",(int16_t)avg2);
+                    
+                    
+                                        v=1;
+
+
+}
+}
+int main()
+{      
+
+
+    printf("Starting ADXL345 test...\n");
+    printf("Device ID is: 0x%02x\n", accelerometer.getDevId());
+
+    //Go into standby mode to configure the device.
+    accelerometer.setPowerControl(0x00);
+
+    //Full resolution, +/-16g, 4mg/LSB.
+    accelerometer.setDataFormatControl(0x00);
+    
+    //3.2kHz data rate.
+    accelerometer.setDataRate(ADXL345_400HZ);
+
+    //Measurement mode.
+    accelerometer.setPowerControl(0x08);
+    
+    flipper1.attach(&flip1, 0.0025); // the address of the
+    flipper2.attach(&flip2, 10); // the address of the
+
+
+
+ //{5.00,5.01,5.01,5.02,5.02,5.02,5.03,5.03,5.04,5.04,5.04,5.04,5.04,5.04,5.04,5.04,5.04,5.04,5.04,5.04,5.04,5.04,5.03,5.03,5.03,5.02,5.02,5.02,5.01,5.00,5.00,4.99,4.99,4.98,4.97,4.96,4.96,4.95,4.94,4.93,4.92,4.91,4.90,4.89,4.88,4.87,4.85,4.84,4.83,4.82,4.80,4.79,4.77,4.76,4.74,4.73,4.71,4.70,4.68,4.66,4.65,4.63,4.61,4.59,4.58,4.56,4.54,4.52,4.50,4.48,4.46,4.44,4.42,4.40,4.37,4.35,4.33,4.31,4.28,4.26,4.24,4.21,4.19,4.16,4.14,4.11,4.09,4.06,4.04,4.01,3.98,3.96,3.93,3.90,3.88,3.85,3.82,3.79,3.76,3.73,3.70,3.67,3.64,3.61,3.58,3.55,3.52,3.49,3.46,3.43,3.40,3.37,3.33,3.30,3.27,3.24,3.20,3.17,3.14,3.10,3.07,3.04,3.00,2.97,2.93,2.90,2.86,2.83,2.79,2.76,2.72,2.69,2.65,2.61,2.58,2.54,2.51,2.47,2.43,2.40,2.36,2.32,2.28,2.25,2.21,2.17,2.13,2.10,2.06,2.02,1.98,1.94,1.91,1.87,1.83,1.79,1.75,1.71,1.67,1.63,1.60,1.56,1.52,1.48,1.44,1.40,1.36,1.32,1.28,1.24,1.20,1.17,1.13,1.09,1.05,1.01,0.97,0.93,0.89,0.85,0.81,0.77,0.73,0.69,0.65,0.61,0.58,0.54,0.50,0.46,0.42,0.38,0.34,0.30,0.26,0.22,0.19,0.15,0.11,0.07,0.03,-0.01,-0.04,-0.08,-0.12,-0.16,-0.20,-0.23,-0.27,-0.31,-0.35,-0.38,-0.42,-0.46,-0.49,-0.53,-0.57,-0.60,-0.64,-0.68,-0.71,-0.75,-0.78,-0.82,-0.85,-0.89,-0.92,-0.96,-0.99,-1.03,-1.06,-1.10,-1.13,-1.16,-1.20,-1.23,-1.26,-1.30,-1.33,-1.36,-1.39,-1.43,-1.46,-1.49,-1.52,-1.55,-1.58,-1.61,-1.64,-1.67,-1.70,-1.73,-1.76,-1.79,-1.82,-1.85,-1.88,-1.90,-1.93,-1.96,-1.99,-2.01,-2.04,-2.07,-2.09,-2.12,-2.14,-2.17,-2.20,-2.22,-2.24,-2.27,-2.29,-2.32,-2.34,-2.36,-2.38,-2.41,-2.43,-2.45,-2.47,-2.49,-2.51,-2.53,-2.55,-2.57,-2.59,-2.61,-2.63,-2.65,-2.67,-2.68,-2.70,-2.72,-2.73,-2.75,-2.77,-2.78,-2.80,-2.81,-2.83,-2.84,-2.85,-2.87,-2.88,-2.89,-2.91,-2.92,-2.93,-2.94,-2.95,-2.96,-2.97,-2.98,-2.99,-3.00,-3.01,-3.02,-3.02,-3.03,-3.04,-3.04,-3.05,-3.06,-3.06,-3.07,-3.07,-3.08,-3.08,-3.08,-3.09,-3.09,-3.09,-3.09,-3.10,-3.10,-3.10,-3.10,-3.10,-3.10,-3.10,-3.10,-3.09,-3.09,-3.09,-3.09,-3.08,-3.08,-3.08,-3.07,-3.07,-3.06,-3.06,-3.05,-3.04,-3.04,-3.03,-3.02,-3.01,-3.01,-3.00,-2.99,-2.98,-2.97,-2.96,-2.95,-2.94,-2.93,-2.91,-2.90,-2.89,-2.88,-2.86,-2.85,-2.83,-2.82,-2.80,-2.79,-2.77,-2.76,-2.74,-2.72,-2.71,-2.69,-2.67,-2.65,-2.63,-2.61,-2.59,-2.57,-2.55,-2.53,-2.51,-2.49,-2.47,-2.45,-2.43,-2.40,-2.38,-2.36,-2.33,-2.31,-2.28,-2.26,-2.23,-2.21,-2.18,-2.15,-2.13,-2.10,-2.07,-2.05,-2.02,-1.99,-1.96,-1.93,-1.90,-1.87,-1.84,-1.81,-1.78,-1.75,-1.72,-1.69,-1.66,-1.62,-1.59,-1.56,-1.52,-1.49,-1.46,-1.42,-1.39,-1.35,-1.32,-1.28,-1.25,-1.21,-1.18,-1.14,-1.10,-1.07,-1.03,-0.99,-0.96,-0.92,-0.88,-0.84,-0.80,-0.76,-0.73,-0.69,-0.65,-0.61,-0.57,-0.53,-0.49,-0.44,-0.40,-0.36,-0.32,-0.28,-0.24,-0.20,-0.15,-0.11,-0.07,-0.03,0.02,0.06,0.10,0.15,0.19,0.23,0.28,0.32,0.37,0.41,0.46,0.50,0.55,0.59,0.64,0.68,0.73,0.77,0.82,0.86,0.91,0.96,1.00,1.05,1.10,1.14,1.19,1.24,1.28,1.33,1.38,1.42,1.47,1.52,1.57,1.61,1.66,1.71,1.76,1.80,1.85,1.90,1.95,1.99,2.04,2.09,2.14,2.19,2.23,2.28,2.33,2.38,2.43,2.47,2.52,2.57,2.62,2.67,2.71,2.76,2.81,2.86,2.90,2.95,3.00,3.05,3.10,3.14,3.19,3.24,3.29,3.33,3.38,3.43,3.48,3.52,3.57,3.62,3.66,3.71,3.76,3.80,3.85,3.90,3.94,3.99,4.04,4.08,4.13,4.17,4.22,4.26,4.31,4.35,4.40,4.44,4.49,4.53,4.58,4.62,4.67,4.71,4.75,4.80,4.84,4.88,4.93,4.97,5.01,5.05,5.10,5.14,5.18,5.22,5.26,5.31,5.35,5.39,5.43,5.47,5.51,5.55,5.59,5.63,5.67,5.70,5.74,5.78,5.82,5.86,5.90,5.93,5.97,6.01,6.04,6.08,6.12,6.15,6.19,6.22,6.26,6.29,6.33,6.36,6.39,6.43,6.46,6.49,6.52,6.56,6.59,6.62,6.65,6.68,6.71,6.74,6.77,6.80,6.83,6.86,6.89,6.92,6.95,6.97,7.00,7.03,7.05,7.08,7.11,7.13,7.16,7.18,7.21,7.23,7.25,7.28,7.30,7.32,7.34,7.37,7.39,7.41,7.43,7.45,7.47,7.49,7.51,7.53,7.54,7.56,7.58,7.60,7.61,7.63,7.65,7.66,7.68,7.69,7.71,7.72,7.73,7.75,7.76,7.77,7.79,7.80,7.81,7.82,7.83,7.84,7.85,7.86,7.87,7.88,7.88,7.89,7.90,7.90,7.91,7.92,7.92,7.93,7.93,7.94,7.94,7.94,7.95,7.95,7.95,7.95,7.95,7.96,7.96,7.96,7.96,7.95,7.95,7.95,7.95,7.95,7.94,7.94,7.94,7.93,7.93,7.92,7.92,7.91,7.91,7.90,7.89,7.89,7.88,7.87,7.86,7.85,7.84,7.83,7.82,7.81,7.80,7.79,7.78,7.77,7.75,7.74,7.73,7.71,7.70,7.68,7.67,7.65,7.64,7.62,7.60,7.59,7.57,7.55,7.53,7.52,7.50,7.48,7.46,7.44,7.42,7.40,7.38,7.35,7.33,7.31,7.29,7.26,7.24,7.22,7.19,7.17,7.14,7.12,7.09,7.07,7.04,7.02,6.99,6.96,6.93,6.91,6.88,6.85,6.82,6.79,6.76,6.73,6.70,6.67,6.64,6.61,6.58,6.55,6.52,6.48,6.45,6.42,6.39,6.35,6.32,6.29,6.25,6.22,6.18,6.15,6.11,6.08,6.04,6.00,5.97,5.93,5.89,5.86,5.82,5.78,5.75,5.71,5.67,5.63,5.59,5.55,5.51,5.47,5.44,5.40,5.36,5.32,5.27,5.23,5.19,5.15,5.11,5.07,5.03,4.99,4.95,4.90,4.86,4.82,4.78,4.73,4.69,4.65,4.60,4.56,4.52,4.47,4.43,4.39,4.34,4.30,4.26,4.21,4.17,4.12,4.08,4.03,3.99,3.94,3.90,3.85,3.81,3.76,3.72,3.67,3.63,3.58,3.54,3.49,3.44,3.40,3.35,3.31,3.26,3.21,3.17,3.12,3.08,3.03,2.99,2.94,2.89,2.85,2.80,2.75,2.71,2.66,2.62,2.57,2.52,2.48,2.43,2.39,2.34,2.29,2.25,2.20,2.16,2.11,2.07,2.02,1.98,1.93,1.88,1.84,1.79,1.75,1.70,1.66,1.61,1.57,1.52,1.48,1.44,1.39,1.35,1.30,1.26,1.21,1.17,1.13,1.08,1.04,1.00,0.95,0.91,0.87,0.83,0.78,0.74,0.70,0.66,0.61,0.57,0.53,0.49,0.45,0.41,0.37,0.33,0.29,0.25,0.21,0.17,0.13,0.09,0.05,0.01,-0.03,-0.07,-0.11,-0.14,-0.18,-0.22,-0.26,-0.29,-0.33,-0.37,-0.40,-0.44,-0.48,-0.51,-0.55,-0.58,-0.62,-0.65,-0.68,-0.72,-0.75,-0.79,-0.82,-0.85,-0.88,-0.92,-0.95,-0.98,-1.01,-1.04,-1.07,-1.10,-1.13,-1.16,-1.19,-1.22,-1.25,-1.28,-1.31,-1.34,-1.37,-1.39,-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-1 ,-29 ,-7 ,-11 ,-6 ,5 ,-29 ,7 ,-18 ,-13 ,7 ,-59 ,4 ,-27 ,-10 ,-19 ,-11 ,0 ,-26 ,-2 ,-15 ,-41};
+//float32_t aaa[NUM_SAMPLES]={40.00,39.26,36.96,33.19,28.11,21.91,14.85,7.22,-0.69,-8.55,-16.05,-22.88,-28.78,-33.50,-36.85,-38.70,-38.97,-37.65,-34.79,-30.50,-24.95,-18.35,-10.97,-3.11,4.94,12.85,20.30,27.01,32.70,37.16,40.21,41.72,41.65,39.99,36.81,32.25,26.49,19.76,12.33,4.50,-3.42,-11.11,-18.25,-24.57,-29.81,-33.75,-36.24,-37.17,-36.51,-34.28,-30.57,-25.52,-19.32,-12.24,-4.54,3.47,11.47,19.15,26.20,32.35,37.35,41.00,43.16,43.75,42.74,40.19,36.18,30.90,24.54,17.36,9.66,1.73,-6.09,-13.49,-20.19,-25.90,-30.41,-33.52,-35.11,-35.11,-33.53,-30.42,-25.90,-20.16,-13.41,-5.93,1.99,10.03,17.88,25.23,31.78,37.28,41.51,44.31,45.56,45.21,43.29,39.88,35.10,29.15,22.28,14.76,6.89,-1.01,-8.63,-15.66,-21.81,-26.84,-30.55,-32.78,-33.45,-32.53,-30.04,-26.09,-20.83,-14.47,-7.27,0.51,8.54,16.51,24.10,31.01,36.98,41.76,45.17,47.07,47.39,46.12,43.31,39.08,33.59,27.07,19.78,12.02,4.09,-3.68,-10.99,-17.54,-23.07,-27.35,-30.21,-31.54,-31.28,-29.43,-26.08,-21.34,-15.42,-8.53,-0.96,7.00,15.04,22.82,30.05,36.45,41.74,45.74,48.28,49.26,48.65,46.47,42.81,37.82,31.70,24.69,17.09,9.19,1.31,-6.23,-13.13,-19.11,-23.94,-27.41,-29.39,-29.79,-28.60,-25.86,-21.68,-16.22,-9.71,-2.39,5.45,13.49,21.41,28.91,35.68,41.47,46.02,49.18,50.82,50.87,49.33,46.27,41.81,36.13,29.46,22.07,14.26,6.33,-1.39,-8.60,-14.99,-20.33,-24.39,-27.00,-28.06,-27.54,-25.43,-21.84,-16.89,-10.79,-3.77,3.89,11.88,19.89,27.60,34.71,40.93,46.02,49.78,52.06,52.77,51.89,49.45,45.55,40.35,34.06,26.94,19.26,11.34,3.49,-3.97,-10.74,-16.54,-21.16,-24.39,-26.11,-26.24,-24.79,-21.80,-17.40,-11.75,-5.08,2.34,10.23,18.27,26.14,33.53,40.16,45.74,50.07,52.98,54.35,54.13,52.32,49.01,44.33,38.47,31.65,24.17,16.31,8.39,0.73,-6.36,-12.60,-17.74,-21.57,-23.93,-24.73,-23.94,-21.58,-17.75,-12.60,-6.32,0.82,8.55,16.57,24.54,32.17,39.14,45.19,50.06,53.58,55.60,56.04,54.88,52.18,48.05,42.65,36.20,28.95,21.21,13.27,5.47,-1.90,-8.53,-14.15,-18.55,-21.54,-23.00,-22.87,-21.16,-17.93,-13.30,-7.47,-0.66,6.86,14.79,22.82,30.63,37.91,44.37,49.76,53.86,56.51,57.61,57.11,55.04,51.49,46.59,40.54,33.59,26.01,18.12,10.22,2.63,-4.34,-10.42,-15.35,-18.94,-21.05,-21.59,-20.54,-17.93,-13.87,-8.51,-2.08,5.18,12.97,21.00,28.94,36.47,43.30,49.16,53.81,57.08,58.83,59.00,57.58,54.62,50.26,44.66,38.05,30.70,22.89,14.95,7.19,-0.07,-6.55,-11.99,-16.17,-18.91,-20.11,-19.72,-17.75,-14.28,-9.44,-3.43,3.51,11.12,19.09,27.10,34.83,41.99,48.28,53.46,57.32,59.71,60.54,59.77,57.44,53.64,48.53,42.31,35.23,27.57,19.65,11.77,4.26,-2.58,-8.49,-13.21,-16.57,-18.43,-18.70,-17.39,-14.53,-10.24,-4.70,1.89,9.25,17.11,25.13,33.02,40.45,47.13,52.80,57.22,60.24,61.72,61.61,59.92,56.72,52.13,46.33,39.58,32.12,24.27,16.33,8.63,1.47,-4.86,-10.11,-14.06,-16.55,-17.49,-16.84,-14.61,-10.91,-5.86,0.32,7.39,15.07,23.06,31.04,38.70,45.72,51.84,56.80,60.42,62.54,63.10,62.06,59.47,55.43,50.11,43.72,36.52,28.79,20.84,13.00,5.58,-1.13,-6.86,-11.37,-14.49,-16.09,-16.10,-14.53,-11.43,-6.92,-1.19,5.54,13.00,20.90,28.92,36.75,44.06,50.59,56.05,60.25,63.01,64.22,63.83,61.88,58.42,53.61,47.63,40.73,33.18,25.28,17.36,9.72,2.68,-3.49,-8.54,-12.26,-14.50,-15.18,-14.27,-11.79,-7.86,-2.61,3.73,10.92,18.67,26.67,34.62,42.18,49.06,54.99,59.74,63.11,64.97,65.25,63.93,61.09,56.81,51.29,44.74,37.42,29.63,21.67,13.87,6.54,-0.03,-5.57,-9.87,-12.74,-14.08,-13.83,-12.00,-8.66,-3.94,1.97,8.83,16.38,24.32,32.32,40.08,47.27,53.63,58.89,62.85,65.34,66.28,65.63,63.40,59.70,54.67,48.52,41.48,33.84,25.91,18.01,10.44,3.52,-2.48,-7.33,-10.81,-12.81,-13.22,-12.05,-9.33,-5.16,0.27,6.77,14.07,21.88,29.89,37.78,45.24,51.98,57.72,62.24,65.35,66.94,66.95,65.37,62.26,57.76,52.04,45.33,37.91,30.06,22.10,14.35,7.12,0.70,-4.65,-8.73,-11.36,-12.44,-11.93,-9.85,-6.27,-1.34,4.74,11.73,19.36,27.33,35.30,42.98,50.05,56.23,61.28,64.99,67.22,67.89,66.96,64.47,60.53,55.29,48.96,41.79,34.08,26.12,18.24,10.76,3.97,-1.86,-6.50,-9.75,-11.49,-11.64,-10.21,-7.24,-2.86,2.76,9.41,16.80,24.66,32.67,40.50,47.86,54.44,59.98,64.26,67.12,68.44,68.17,66.32,62.97,58.24,52.33,45.47,37.95,30.05,22.10,14.41,7.29,1.02,-4.14,-7.98,-10.37,-11.19,-10.42,-8.08,-4.27,0.85,7.10,14.22,21.92,29.89,37.84,45.42,52.35,58.35,63.18,66.65,68.62,69.01,67.80,65.05,60.87,55.43,48.93,41.64,33.86,25.89,18.05,10.65,3.99,-1.66,-6.08,-9.09,-10.57,-10.47,-8.78,-5.57,-0.97,4.83,11.62,19.11,27.00,35.00,42.76,50.00,56.41,61.75,65.80,68.40,69.45,68.90,66.78,63.18,58.23,52.14,45.14,37.52,29.59,21.65,14.03,7.03,0.92,-4.04,-7.66,-9.79,-10.35,-9.32,-6.74,-2.70,2.62,9.03,16.25,24.02,32.00,39.90,47.39,54.17,59.99,64.59,67.80,69.50,69.62,68.14,65.14,60.72,55.07,48.42,41.02,33.17,25.20,17.40,10.10,3.59,-1.88,-6.08,-8.85,-10.07,-9.71,-7.76,-4.32,0.49,6.47,13.38,20.95,28.88,36.85,44.54,51.65,57.89,63.02,66.83,69.17,69.94,69.12,66.74,62.88,57.72,51.45,44.32,36.62,28.66,20.74,13.20,6.32,0.39,-4.37,-7.75,-9.64,-9.94,-8.65,-5.82,-1.56,3.95,10.51,17.84,25.65,33.64,41.48,48.86,55.50,61.11,65.49,68.45,69.87,69.71,67.96,64.71,60.06,54.22,47.41,39.91,32.01,24.04,16.29,9.10,2.74,-2.54,-6.51,-9.04,-10.01,-9.38,-7.18,-3.51,1.51,7.65,14.69,22.34,30.29,38.22,45.83,52.81,58.87,63.78,67.34,69.41,69.91,68.82,66.17,62.08,56.71,50.27,43.01,35.24,27.25,19.37,11.91,5.17,-0.59,-5.14,-8.29,-9.91,-9.95,-8.41,-5.34,-0.86,4.84,11.53,18.96,26.82,34.79,42.57,49.84,56.31,61.73,65.87,68.57,69.72,69.28,67.27,63.76,58.89,52.86,45.91,38.31,30.37,22.41,14.73,7.65,1.44,-3.63,-7.38,-9.66,-10.37,-9.48,-7.04,-3.13,2.08,8.39,15.54,23.25,31.21,39.11,46.63,53.46,59.34,64.03,67.34,69.14,69.36,68.00,65.09,60.76,55.19,48.58,41.22,33.38,25.38,17.54,10.17,3.56,-2.01,-6.34,-9.25,-10.62,-10.40,-8.60,-5.29,-0.60,5.28,12.11,19.62,27.51,35.47,43.18,50.33,56.63,61.83,65.73,68.17,69.06,68.34,66.06,62.30,57.22,51.01,43.92,36.24,28.26,20.31,12.71,5.75,-0.29,-5.16,-8.68,-10.71,-11.15,-10.01,-7.32,-3.18,2.22,8.68,15.94,23.71,31.67,39.52,46.93,53.62,59.30,63.77,66.82,68.36,68.30,66.66,63.50,58.94,53.17,46.41,38.94,31.04,23.04,15.25,7.98,1.53,-3.86,-7.97,-10.63,-11.74,-11.26,-9.21,-5.66,-0.77,5.28,12.24,19.83,27.75,35.68,43.30,50.32,56.45,61.44,65.10,67.28,67.88,66.89,64.35,60.35,55.05,48.67,41.46,33.69,25.69,17.77,10.25,3.42,-2.45,-7.11,-10.39,-12.16,-12.35,-10.95,-8.01,-3.66,1.93,8.54,15.90,23.71,31.67,39.46,46.77,53.29,58.78,63.01,65.81,67.08,66.75,64.84,61.42,56.64,50.68,43.77,36.20,28.25,20.26,12.53,5.37,-0.93,-6.12,-10.00,-12.42,-13.27,-12.53,-10.22};
+//float32_t sinoos[NUM_SAMPLES] ={5.00,4.91,4.62,4.14,3.51,2.73,1.85,0.89,-0.10,-1.08,-2.02,-2.88,-3.61,-4.21,-4.63,-4.86,-4.90,-4.73,-4.38,-3.84,-3.15,-2.33,-1.40,-0.42,0.58,1.57,2.50,3.34,4.05,4.60,4.98,5.17,5.16,4.95,4.55,3.98,3.26,2.41,1.48,0.50,-0.49,-1.45,-2.34,-3.14,-3.79,-4.29,-4.60,-4.72,-4.64,-4.36,-3.90,-3.27,-2.49,-1.61,-0.65,0.35,1.35,2.31,3.19,3.96,4.58,5.03,5.30,5.37,5.25,4.93,4.42,3.76,2.97,2.07,1.10,0.11,-0.87,-1.80,-2.63,-3.35,-3.91,-4.30,-4.50,-4.51,-4.31,-3.92,-3.36,-2.64,-1.80,-0.87,0.12,1.12,2.10,3.02,3.84,4.52,5.05,5.40,5.55,5.51,5.27,4.84,4.24,3.50,2.64,1.69,0.71,-0.28,-1.23,-2.11,-2.88,-3.51,-3.98,-4.26,-4.35,-4.23,-3.92,-3.43,-2.77,-1.98,-1.08,-0.11,0.89,1.89,2.83,3.70,4.44,5.04,5.46,5.70,5.74,5.58,5.22,4.69,4.01,3.19,2.28,1.31,0.31,-0.66,-1.58,-2.40,-3.09,-3.62,-3.98,-4.15,-4.12,-3.89,-3.47,-2.88,-2.14,-1.28,-0.34,0.66,1.66,2.63,3.53,4.33,4.99,5.49,5.80,5.93,5.85,5.57,5.11,4.49,3.72,2.85,1.89,0.91,-0.08,-1.02,-1.89,-2.64,-3.24,-3.68,-3.93,-3.98,-3.83,-3.49,-2.97,-2.29,-1.47,-0.56,0.42,1.42,2.41,3.35,4.19,4.91,5.48,5.87,6.08,6.08,5.89,5.50,4.95,4.23,3.40,2.47,1.50,0.50,-0.46,-1.37,-2.17,-2.83,-3.34,-3.67,-3.81,-3.74,-3.48,-3.03,-2.41,-1.65,-0.78,0.18,1.18,2.18,3.14,4.03,4.80,5.44,5.91,6.19,6.28,6.17,5.86,5.37,4.72,3.93,3.04,2.08,1.09,0.10,-0.83,-1.68,-2.40,-2.98,-3.39,-3.60,-3.62,-3.44,-3.07,-2.52,-1.82,-0.98,-0.06,0.93,1.93,2.91,3.84,4.66,5.36,5.90,6.26,6.43,6.40,6.18,5.76,5.18,4.44,3.59,2.65,1.67,0.68,-0.28,-1.17,-1.95,-2.60,-3.07,-3.37,-3.47,-3.38,-3.08,-2.60,-1.96,-1.18,-0.29,0.68,1.68,2.67,3.63,4.50,5.25,5.86,6.30,6.55,6.60,6.46,6.12,5.60,4.92,4.12,3.21,2.24,1.25,0.27,-0.65,-1.48,-2.19,-2.74,-3.11,-3.30,-3.28,-3.07,-2.67,-2.09,-1.36,-0.51,0.43,1.42,2.42,3.40,4.30,5.11,5.78,6.29,6.62,6.76,6.70,6.44,5.99,5.38,4.62,3.75,2.80,1.81,0.83,-0.12,-1.00,-1.76,-2.38,-2.83,-3.09,-3.16,-3.03,-2.70,-2.20,-1.53,-0.73,0.18,1.15,2.16,3.15,4.09,4.94,5.67,6.25,6.66,6.88,6.90,6.72,6.35,5.80,5.10,4.27,3.35,2.38,1.38,0.41,-0.50,-1.31,-1.99,-2.51,-2.86,-3.01,-2.96,-2.72,-2.28,-1.68,-0.93,-0.06,0.89,1.88,2.88,3.85,4.74,5.53,6.17,6.65,6.95,7.05,6.96,6.66,6.19,5.55,4.77,3.88,2.93,1.93,0.95,0.01,-0.85,-1.59,-2.18,-2.60,-2.83,-2.87,-2.70,-2.35,-1.81,-1.12,-0.30,0.62,1.60,2.60,3.59,4.51,5.35,6.06,6.61,6.98,7.17,7.15,6.94,6.54,5.97,5.24,4.39,3.46,2.48,1.49,0.52,-0.37,-1.17,-1.82,-2.32,-2.63,-2.75,-2.67,-2.39,-1.93,-1.30,-0.53,0.36,1.31,2.31,3.31,4.26,5.14,5.91,6.52,6.98,7.24,7.31,7.18,6.85,6.35,5.68,4.88,3.98,3.01,2.02,1.04,0.11,-0.73,-1.45,-2.01,-2.40,-2.60,-2.61,-2.41,-2.02,-1.46,-0.75,0.09,1.03,2.01,3.01,3.99,4.91,5.72,6.40,6.93,7.27,7.42,7.37,7.13,6.69,6.09,5.34,4.48,3.53,2.55,1.56,0.60,-0.28,-1.05,-1.69,-2.15,-2.43,-2.52,-2.40,-2.10,-1.60,-0.95,-0.16,0.74,1.71,2.71,3.70,4.64,5.50,6.24,6.84,7.26,7.49,7.52,7.36,7.00,6.47,5.77,4.95,4.04,3.06,2.07,1.09,0.18,-0.65,-1.34,-1.88,-2.24,-2.41,-2.38,-2.15,-1.73,-1.14,-0.40,0.45,1.40,2.39,3.39,4.36,5.26,6.05,6.71,7.20,7.51,7.63,7.55,7.27,6.80,6.17,5.40,4.52,3.57,2.58,1.59,0.64,-0.23,-0.98,-1.58,-2.02,-2.27,-2.32,-2.18,-1.84,-1.32,-0.64,0.17,1.09,2.06,3.06,4.05,4.98,5.82,6.54,7.10,7.49,7.69,7.69,7.49,7.10,6.54,5.82,4.98,4.06,3.07,2.08,1.11,0.21,-0.60,-1.27,-1.78,-2.11,-2.24,-2.18,-1.92,-1.47,-0.86,-0.10,0.78,1.73,2.72,3.72,4.68,5.56,6.33,6.96,7.43,7.71,7.79,7.67,7.36,6.87,6.21,5.42,4.52,3.56,2.56,1.58,0.64,-0.21,-0.94,-1.52,-1.92,-2.14,-2.16,-1.98,-1.61,-1.07,-0.36,0.47,1.39,2.37,3.37,4.35,5.27,6.09,6.79,7.32,7.68,7.84,7.81,7.58,7.16,6.56,5.83,4.97,4.03,3.04,2.05,1.08,0.19,-0.59,-1.24,-1.72,-2.02,-2.12,-2.02,-1.73,-1.26,-0.62,0.17,1.05,2.02,3.01,4.01,4.95,5.82,6.57,7.17,7.61,7.85,7.90,7.75,7.40,6.88,6.20,5.39,4.48,3.50,2.51,1.53,0.60,-0.23,-0.94,-1.49,-1.87,-2.05,-2.04,-1.83,-1.43,-0.85,-0.13,0.72,1.65,2.64,3.64,4.61,5.51,6.32,6.98,7.49,7.81,7.94,7.88,7.61,7.16,6.54,5.78,4.90,3.95,2.96,1.97,1.01,0.14,-0.62,-1.24,-1.70,-1.96,-2.03,-1.91,-1.58,-1.08,-0.41,0.39,1.29,2.26,3.26,4.24,5.18,6.03,6.75,7.33,7.73,7.94,7.96,7.77,7.40,6.85,6.14,5.31,4.38,3.40,2.40,1.43,0.52,-0.30,-0.98,-1.51,-1.85,-2.01,-1.96,-1.72,-1.29,-0.69,0.06,0.93,1.87,2.86,3.86,4.82,5.71,6.49,7.13,7.61,7.90,7.99,7.89,7.59,7.11,6.47,5.68,4.79,3.83,2.83,1.84,0.90,0.04,-0.70,-1.30,-1.72,-1.95,-1.99,-1.83,-1.48,-0.94,-0.26,0.56,1.48,2.46,3.45,4.44,5.36,6.19,6.89,7.44,7.81,7.98,7.96,7.75,7.34,6.76,6.03,5.18,4.24,3.25,2.25,1.29,0.39,-0.41,-1.07,-1.56,-1.88,-2.00,-1.92,-1.65,-1.19,-0.56,0.21,1.09,2.04,3.04,4.03,4.98,5.85,6.61,7.22,7.67,7.93,7.99,7.85,7.52,7.01,6.34,5.54,4.63,3.66,2.66,1.67,0.74,-0.10,-0.82,-1.39,-1.78,-1.99,-1.99,-1.80,-1.41,-0.85,-0.14,0.70,1.62,2.61,3.60,4.58,5.49,6.29,6.97,7.49,7.83,7.97,7.92,7.66,7.23,6.62,5.86,5.00,4.05,3.05,2.06,1.10,0.21,-0.56,-1.20,-1.66,-1.95,-2.04,-1.93,-1.62,-1.13,-0.48,0.31,1.20,2.17,3.16,4.15,5.09,5.94,6.68,7.27,7.68,7.91,7.93,7.76,7.40,6.86,6.16,5.34,4.42,3.44,2.44,1.46,0.54,-0.29,-0.98,-1.53,-1.89,-2.06,-2.03,-1.81,-1.39,-0.81,-0.07,0.78,1.72,2.71,3.70,4.67,5.56,6.35,7.00,7.49,7.79,7.91,7.82,7.53,7.06,6.43,5.65,4.77,3.81,2.81,1.82,0.87,-0.00,-0.76,-1.37,-1.81,-2.06,-2.11,-1.97,-1.63,-1.12,-0.44,0.37,1.27,2.25,3.24,4.22,5.15,5.99,6.70,7.26,7.64,7.83,7.82,7.62,7.23,6.66,5.94,5.09,4.16,3.17,2.17,1.20,0.29,-0.52,-1.19,-1.70,-2.04,-2.17,-2.11,-1.86,-1.41,-0.80,-0.04,0.83,1.78,2.77,3.76,4.71,5.59,6.36,6.98,7.44,7.71,7.79,7.66,7.35,6.85,6.19,5.39,4.49,3.52,2.52,1.53,0.59,-0.26,-1.00,-1.58,-1.99,-2.21,-2.23,-2.06,-1.69,-1.14,-0.44,0.38,1.30,2.28,3.28,4.25,5.16,5.98,6.67,7.20,7.55,7.71,7.67,7.43,7.00,6.40,5.66,4.80,3.85,2.86,1.86,0.89,-0.00,-0.79,-1.44,-1.92,-2.22,-2.33,-2.23,-1.94};
+
+
+/*arm_rfft_instance_q15 Sfft;
+ arm_rfft_init_q15(&Sfft, NUM_SAMPLES, 0, 1);
+arm_rfft_q15 (&Sfft, sinoos, leftFFT);
+         arm_q15_to_float (leftFFT, auxFloat, 2*NUM_SAMPLES); // doing abs is very sensitive to rounding, better to be done in float
+         arm_cmplx_mag_f32 (auxFloat, auxFloat, NUM_SAMPLES);
+        arm_float_to_q15 (auxFloat, left, NUM_SAMPLES);*/
+    
+      
+
+      while(1)
+            {      
+                
+            }
+    }
+