emg

Dependencies:   HIDScope MODSERIAL mbed-dsp mbed TouchButton

Fork of test by BMT M9 Groep01

Files at this revision

API Documentation at this revision

Comitter:
s1340735
Date:
Tue Oct 28 21:33:34 2014 +0000
Parent:
43:bc93d31b80f5
Child:
45:32ca80fb87e4
Commit message:
laatste versie :D

Changed in this revision

TouchButton.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/TouchButton.lib	Tue Oct 28 16:37:38 2014 +0000
+++ b/TouchButton.lib	Tue Oct 28 21:33:34 2014 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/BMT-M9-Groep01/code/TouchButton/#c77d8b0165c0
+http://developer.mbed.org/teams/BMT-M9-Groep01/code/TouchButton/#6153458ce46b
--- a/main.cpp	Tue Oct 28 16:37:38 2014 +0000
+++ b/main.cpp	Tue Oct 28 21:33:34 2014 +0000
@@ -181,7 +181,7 @@
 
     while(true) {
         key = TButton.PressedButton();
-        if (key==1) {
+        if (key==1) {//duurt 8 seconden
             //rood
             myled1 = 0;
             myled2 = 1;
@@ -198,7 +198,7 @@
             wait(3);
         }
 
-        if (key==2) {
+        if (key==2) {//duurt 26 seconden
             //green
             myled1 = 1;
             myled2 = 0;
@@ -211,14 +211,14 @@
             pc.printf("drempelwaarde snelheid 1 is %f\r\n", drempelwaardeB1);
             wait(3);
 
-            pc.printf("calibratie bicep snelheid 2 aan\n");
+            pc.printf("calibratie biceps snelheid 2 aan\n");
             wait(2);
             Calibratie_Biceps();
             drempelwaardeB2=MOVAVG_B-1;
             pc.printf("drempelwaarde snelheid 2 is %f\r\n", drempelwaardeB2);
             wait(3);
 
-            pc.printf("calibratie bicep snelheid 3 aan\n");
+            pc.printf("calibratie biceps snelheid 3 aan\n");
             wait(2);
             Calibratie_Biceps();
             drempelwaardeB3=MOVAVG_B-1;
@@ -228,14 +228,13 @@
             wait(5);
         }
 
-        if (key==3) {
-                
-                //blue
-                myled1 = 1;
-                myled2 = 1;
-                myled3 = 0;
-                wait(0.1);
-                
+        if (key==3) {//duurt 34 seconden
+
+            //blue
+            myled1 = 1;
+            myled2 = 1;
+            myled3 = 0;
+
             if(drempelwaardeT==0) {
                 pc.printf("geen waarde calibratie TRICEPS \n");
             }
@@ -248,7 +247,7 @@
             if (drempelwaardeB3==0) {
                 pc.printf("geen waarde calibratie BICEPS 3 \n");
             } else {
-                
+
                 pc.printf("eerst positie dan snelheid aangeven /n");
 
                 //bepaling van positie met triceps 1
@@ -271,9 +270,9 @@
                 } else {
                     yT1=0;
                 }
-                
+
                 pc.printf("Triceps meting 1 is klaar.\n");
-                wait(5);
+                wait(3);
 
                 //bepaling van positie met tricep 2
                 Ticker log_timerT2;
@@ -295,6 +294,7 @@
                 }
 
                 pc.printf("Triceps meting 2 is klaar.\n");
+                wait(3);
 
                 //*** INPUT MOTOR 2 ***
                 positie=yT1+yT2;
@@ -341,6 +341,8 @@
                 } else {
                     yB1=0;
                 }
+                pc.printf("Biceps meting is klaar.\n");
+                wait(3);
 
                 //*** INPUT MOTOR 1 ***
                 snelheidsstand=yB1+yB2+yB3;
@@ -361,8 +363,9 @@
                         }
                     }
                 }
+                wait(5);
             }
         }
 
     }
-}
+}
\ No newline at end of file