Carlmaykel Orman / Mbed 2 deprecated NR_method_1

Dependencies:   HIDScope QEI biquadFilter mbed

Fork of NR_method by Thijs Rakels

Files at this revision

API Documentation at this revision

Comitter:
fabuled
Date:
Fri Nov 02 09:47:03 2018 +0000
Parent:
15:56775c151fee
Commit message:
Finished code with hidscope commented out;

Changed in this revision

NR_method_1.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/NR_method_1.cpp	Fri Nov 02 09:40:19 2018 +0000
+++ b/NR_method_1.cpp	Fri Nov 02 09:47:03 2018 +0000
@@ -7,7 +7,7 @@
 #include <ctime>
 #include <QEI.h>
 #include "PID_controler.h"
-#include <HIDScope.h>
+//#include <HIDScope.h>
 
 //Define in/outputs
 Serial pc(USBTX, USBRX);
@@ -25,7 +25,7 @@
 DigitalOut M2(D7); // direction of motor 2
 
 // hidscope
-HIDScope    scope( 4 ); // 4 to check the different
+//HIDScope    scope( 4 ); // 4 to check the different
 
 // tickers
 Ticker sample_timer;
@@ -442,8 +442,8 @@
 
 
         if(bas == true) {
+            Led = 1;
             if(calibration == true) {
-                Led = 1;
                 Led2 = 0;
                 filteren();
 
@@ -451,10 +451,10 @@
                     sumemgx = sumemgx + emgFiltered3;
                     sumemgy = sumemgy + emgFiltered23;
                     countsemg ++;
-                scope.set(0, emgFiltered3); // filtered 1
-                scope.set(1, emgFiltered23); //filtered signal 2
+               // scope.set(0, emgFiltered3); // filtered 1
+                //scope.set(1, emgFiltered23); //filtered signal 2
                 
-                scope.send();
+                //scope.send();
                 } else {
                     calibration = false;
                     countsemg = 0;
@@ -476,9 +476,9 @@
 
                 //scope.set(0, ex); // filtered 1
                 //scope.set(1, Cxx); //filtered signal 2
-                scope.set(2, emgFiltered3);
-                scope.set(3, emgFiltered23);
-                scope.send();
+                //scope.set(2, emgFiltered3);
+                //scope.set(3, emgFiltered23);
+                //scope.send();
                 
 
                 if (i <= 250) {