Bandpass, notch, abs en laagdoorlaat 3H

Dependencies:   HIDScope MODSERIAL TextLCD mbed-dsp mbed

Fork of EMGmeten by Laura Heus

Revision:
3:c82170d8b6c8
Parent:
2:5d64e4c95f5c
Child:
4:7150ed6ce984
diff -r 5d64e4c95f5c -r c82170d8b6c8 EMGmeten.cpp
--- a/EMGmeten.cpp	Tue Oct 28 16:37:27 2014 +0000
+++ b/EMGmeten.cpp	Wed Oct 29 08:57:43 2014 +0000
@@ -13,7 +13,7 @@
 arm_biquad_casd_df1_inst_f32 notch; //50Hz
 float lowpass_1_const[] = {0.978030479206560 , 1.956060958413119 , 0.978030479206560 , -1.955578240315036 , -0.956543676511203};
 float lowpass_1_states[4];
-float lowpass_2_const[] = {0.002080567135492 , 0.004161134270985 , 0.002080567135492 , 1.866892279711715 , 0.875214548253684};
+float lowpass_2_const[] = {0.002080567135492 , 0.004161134270985 , 0.002080567135492 , 1.866892279711715 , -0.875214548253684};
 float lowpass_2_states[4];
 float highpass_const[] = {0.638945525159022 , -1.277891050318045 ,  0.638945525159022 , 1.142980502539901 , -0.412801598096189};
 float highpass_states[4];
@@ -33,7 +33,7 @@
     arm_biquad_cascade_df1_f32(&notch, &filtered_emg, &filtered_emg, 1);
     filtered_emg = fabs(filtered_emg);
     //emg_value_f32 = fabs(emg_value_f32);
-    //arm_biquad_cascade_df1_f32(&lowpass_2, &emg_value_f32, &filtered_emg, 1 );
+    arm_biquad_cascade_df1_f32(&lowpass_2, &filtered_emg, &filtered_emg, 1 );
     
     scope.set(0,emg_value);     //uint value
     scope.set(1,filtered_emg);  //processed float
@@ -47,7 +47,7 @@
     arm_biquad_cascade_df1_init_f32(&lowpass_1,1 , lowpass_1_const, lowpass_1_states);
     arm_biquad_cascade_df1_init_f32(&highpass,1 , highpass_const, highpass_states);
     arm_biquad_cascade_df1_init_f32(&notch,1 , notch_const, notch_states);
-    //arm_biquad_cascade_df1_init_f32(&lowpass_2,1 , lowpass_2_const, lowpass_2_states);
+    arm_biquad_cascade_df1_init_f32(&lowpass_2,1 , lowpass_2_const, lowpass_2_states);
     
     log_timer.attach(looper, 0.005);