Remco Dasselaar / Mbed 2 deprecated TotalControlEmg2

Dependencies:   HIDScope MODSERIAL QEI TextLCD mbed

Fork of TotalControlEmg2 by Remco Dasselaar

Revision:
36:549d1ce7b96b
Parent:
35:012b2e045579
Child:
37:090ba5b1e655
diff -r 012b2e045579 -r 549d1ce7b96b main.cpp
--- a/main.cpp	Tue Oct 20 08:41:38 2015 +0000
+++ b/main.cpp	Tue Oct 20 09:06:18 2015 +0000
@@ -256,8 +256,8 @@
                 btn = false;                    // Button is unpressed
                 R = false;                      // modeR must become 1
                 L = false;                      // modeL must become 1
-                PRINT("Calibrate beam");
-                wait(1);
+                PRINT("Calibrate beam   to 10 o'clock");
+                wait(1);                
                 PRINT("Flex right half to swing beam");                                  
                 while(state==CALIBRATE_PEND){                    
                     if(emgFlag){                        
@@ -297,7 +297,7 @@
                 pc.printf("Aim with EMG\r\n");              // terminal                   
                 int i = 0;                                  // counter for lcd      
                 while(state == AIM){
-                    if(lcdFlag){
+                    if(lcdFlag){                            // LCD loopje to project 3 texts on lcd
                         lcdFlag = false;
                         if(i%3 == 0){
                             PRINT("Flex left or     right half to aim");
@@ -332,7 +332,7 @@
                 R = false;
                 int i = 0;                                  // counter for lcd      
                 while(state == BREAK){
-                    if(lcdFlag){
+                    if(lcdFlag){                            // LCD loop to project text on LCD
                         lcdFlag = false;
                         if(i%2 == 0){
                             PRINT("Flex L or R to   adjust break");
@@ -379,7 +379,7 @@
                             if(modeL > 1 || modeR > 1){               // Print BREAK scale if one of both modes > 1
                                 pc.printf("Current breaking scale: %i\r\n", breakPerc);
                                 lcd.cls();
-                                lcd.printf("Break scale is:   %i", breakPerc); 
+                                lcd.printf("Break scale: %i", breakPerc); 
                                 }                     
                             }                    
                         }
@@ -411,11 +411,12 @@
                         controlFlag = false;                                                                                                                        
                         if((abs(enc1.getPulses())+50)%4200 < 150){    // rotate beam one revolution
                             pwmM1.write(0);                      // motor beam off
-                            pc.printf("beam on startposition\r\n");
+                            pc.printf("Beam on startposition\r\n");
                             state = AIM;                        // Next stage
                             }                           
                         }                       
-                    }                                                     
+                    }
+                lcd.cls();                                                     
                 break;
                 }
             }