EMG signals all around zero, not showing differences anymore in hidscope

Dependencies:   HIDScope MODSERIAL biquadFilter mbed

Fork of a_check_emg_filtered_without_cal by Daniqe Kottelenberg

Revision:
14:5b17697cf775
Parent:
13:6c2daab3547b
Child:
15:bb4a6c7836d8
diff -r 6c2daab3547b -r 5b17697cf775 main.cpp
--- a/main.cpp	Mon Oct 24 09:55:48 2016 +0000
+++ b/main.cpp	Mon Oct 24 10:22:54 2016 +0000
@@ -1,12 +1,12 @@
 //libraries
 #include "mbed.h"
 #include "HIDScope.h"
-#include "biquadFilter.h"  
+#include "BiQuad.h"  
 
 //Define objects
 AnalogIn    emg0( A0 );             //analog in to get EMG in to c++
 Ticker      sample_timer;           //ticker
-HIDScope    scope(1);              //open 3 channels in hidscope
+HIDScope    scope( 3);              //open 3 channels in hidscope
 DigitalOut richting_motor1(D4);     //motor1 direction output    
 PwmOut pwm_motor1(D5);              //motor1 velocity  output
 DigitalOut  led(LED_GREEN);
@@ -16,9 +16,9 @@
 double emg_gefilterd;
 double emg_abs;
 int    onoffsignal=0;
-double cut_off_value=0.; //gespecifeerd door floortje
+double cut_off_value=0.05; //gespecifeerd door floortje
 
-biquadFilter filterhigh1(9.5654e-01,-1.9131e+00,9.5654e-01,-1.9112e+00,9.1498e-01);
+BiQuad filterhigh1(9.5654e-01,-1.9131e+00,9.5654e-01,-1.9112e+00,9.1498e-01);
 
 
 void filter(){
@@ -35,6 +35,8 @@
                       
         //send signals  to scope
         scope.set(0, emg_0_value );           //set emg signal to scope in channel 1
+        scope.set(1, emg_gefilterd );    
+        scope.set(2, onoffsignal);
         scope.send();                       //send all the signals to the scope
                 }