Leon Klute / Mbed 2 deprecated EMG_Controller_6

Dependencies:   HIDScope QEI biquadFilter mbed

Fork of EMG_Controller_5 by Nahuel Manterola

Files at this revision

API Documentation at this revision

Comitter:
LeeJon
Date:
Mon Oct 31 12:44:15 2016 +0000
Parent:
17:80316a7a917a
Commit message:
meer commetns

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
servoController.h Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Oct 31 12:39:41 2016 +0000
+++ b/main.cpp	Mon Oct 31 12:44:15 2016 +0000
@@ -114,15 +114,14 @@
     low_pass_1.add( &bq19 ).add( &bq110 ).add( &bq111 );
     low_pass_2.add( &bq29 ).add( &bq210 ).add( &bq211 );
     
-    //call the timeouts for the startup states and the tickers for reading the emgs
+    //call the timeouts for the startup states and the ticker for reading the emgs
     change_state.attach( &calibrate,1);
     change_state2.attach( &run,11);
     controlstarterTimeout.attach(&start_controlling,11);
-    emgSampleTicker.attach( &emgSample, 0.005); //200Hz
-    ServoPWMpin.period(0.01f);                          // 0.01 second period
+    emgSampleTicker.attach( &emgSample, 0.005);         //200Hz
+    ServoPWMpin.period(0.01f);                          // 0.01 second period of pwm cycle
     
     while (true) {
- //       pc.printf("\n\r%f", Norm_EMG_0);
         if (go_emgSample == true){
                 EMG_filter();
         }
--- a/servoController.h	Mon Oct 31 12:39:41 2016 +0000
+++ b/servoController.h	Mon Oct 31 12:44:15 2016 +0000
@@ -5,7 +5,7 @@
 
 bool readtime = 1;
 double ServoAngle = 89 ;
-float Pulsew = 0.0015;
+float Pulsew = 0.0015;                  // puslewidth for middle postion
 double treshold = 0.6;
 bool binary_input_signal = 0;
 bool binary_input_signal_previous = 0;