Marijke Zondag / Mbed 2 deprecated Project_script_union_final_version

Dependencies:   HIDScope MODSERIAL QEI biquadFilter mbed

Fork of Project_script_union_final by Jorine Oosting

Files at this revision

API Documentation at this revision

Comitter:
MarijkeZondag
Date:
Mon Oct 22 12:48:44 2018 +0000
Parent:
17:741798018c0d
Child:
19:466ada92bf65
Commit message:
nieuwe versies modserial voor hid scope;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Oct 22 12:12:27 2018 +0000
+++ b/main.cpp	Mon Oct 22 12:48:44 2018 +0000
@@ -38,7 +38,7 @@
 double movAg0,movAg1,movAg2;                                                                     //outcome of MovAg
 
 //calibration
-int x = 0;
+static int x = -1;
 int emg_cal = 0;
 const int sizeCal = 2000;
 double StoreCal0[sizeCal], StoreCal1[sizeCal], StoreCal2[sizeCal];
@@ -155,7 +155,7 @@
         ledb = 1;
         ledg = 0;
     }
-    else                        //If x > 3, led is white
+    else                        //If x = 3, led is white
     {
         ledr = 0;
         ledb = 0;
@@ -180,7 +180,7 @@
             {
                 StoreCal0[j] = emgfilter0;
                 sum+=StoreCal0[j];
-                wait(0.001f);
+                //wait(0.001f);
             }
             Mean0       = sum/sizeCal;
             Threshold0  = Mean0/2;
@@ -193,7 +193,7 @@
             {
                 StoreCal1[j] = emgfilter1;
                 sum+=StoreCal1[j];
-                wait(0.001f);
+                //wait(0.001f);
             }
             Mean1       = sum/sizeCal;
             Threshold1  = Mean1/2;
@@ -206,7 +206,7 @@
             {
                 StoreCal1[j] = emgfilter2;
                 sum+=StoreCal2[j];
-                wait(0.001f);
+                //wait(0.001f);
             }
             Mean2       = sum/sizeCal;
             Threshold2  = Mean2/2;
@@ -215,7 +215,7 @@
         case 3:                                     //EMG is calibrated, robot can be set to Home position.
         {
             emg_cal = 1;
-            wait(0.001f);
+            //wait(0.001f);
             break;
         }
         default:                                    //Ensures nothing happens if x is not 0,1 or 2.
--- a/mbed.bld	Mon Oct 22 12:12:27 2018 +0000
+++ b/mbed.bld	Mon Oct 22 12:48:44 2018 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/a330f0fddbec
\ No newline at end of file
+https://os.mbed.com/users/mbed_official/code/mbed/builds/675da3299148
\ No newline at end of file