Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope MODSERIAL QEI TextLCD mbed
Fork of TotalControlEmg2 by
Revision 36:549d1ce7b96b, committed 2015-10-20
- Comitter:
- RichardRoos
- Date:
- Tue Oct 20 09:06:18 2015 +0000
- Parent:
- 35:012b2e045579
- Child:
- 37:090ba5b1e655
- Commit message:
- Hoppa gaan
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
}
}
