:)

Dependencies:   HIDScope MODSERIAL mbed-dsp mbed

Fork of emg_filter by Tanja H

Files at this revision

API Documentation at this revision

Comitter:
s1340735
Date:
Fri Oct 17 08:38:15 2014 +0000
Parent:
26:b93c82fb6e1d
Child:
28:2d1c7d7635d0
Commit message:
void loopers

Changed in this revision

EMGfilter.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/EMGfilter.cpp	Fri Oct 17 08:32:39 2014 +0000
+++ b/EMGfilter.cpp	Fri Oct 17 08:38:15 2014 +0000
@@ -8,6 +8,7 @@
 AnalogIn    emgT(PTB1); //Analog input tricep
 
 float filtered_emgB;
+float filtered_emgT;
 
 MODSERIAL pc(USBTX,USBRX);
 
@@ -67,7 +68,7 @@
 {
     /*variable to store value in*/
     uint16_t emg_valueT;
-    float filtered_emgT;
+    
     float emg_value_f32T;
     /*put raw emg value both in red and in emg_value*/
     emg_valueT = emgT.read_u16(); // read direct ADC result, converted to 16 bit integer (0..2^16 = 0..65536 = 0..3.3V)
@@ -79,8 +80,8 @@
     arm_biquad_cascade_df1_f32(&lowpass, &filtered_emgT, &filtered_emgT, 1 );
 
     /*send value to PC. */
-    scope.set(0,emg_valueT);     //uint value
-    scope.set(1,filtered_emgT);  //processed float
+    scope.set(2,emg_valueT);     //uint value
+    scope.set(3,filtered_emgT);  //processed float
     scope.send();
 
 }