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.
Fork of Timer by
Revision 91:65fb6b9f3932, committed 2016-05-06
- Comitter:
- IceTeam
- Date:
- Fri May 06 13:36:06 2016 +0000
- Parent:
- 90:78d2c1527c95
- Child:
- 92:adb71eafef57
- Commit message:
- Commit des 71 points
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri May 06 12:34:25 2016 +0000
+++ b/main.cpp Fri May 06 13:36:06 2016 +0000
@@ -24,6 +24,8 @@
/* Debut du programme */
int main(void)
{
+ roboclaw.ForwardM1(0);
+ roboclaw.ForwardM2(0);
Ticker ticker;
Timeout end;
ticker.attach(&Sharps, 0.01);
@@ -38,28 +40,56 @@
wait(1);
umbrella.setMaxTorque(0);
+ while(START == 1)
+ {
+ LEDR = 1;
+ LEDV = 1;
+ wait(0.5);
+ LEDR = 0;
+ LEDV = 0;
+ wait(0.5);
+ }
+
+ wait(1);
depart();
+
if (SCouleur == VERT) {
- end.attach(&endFonc, 60);
+ end.attach(&endFonc, 90);
GotoDist(9.0);
GotoArr(9.2);
R_SEUIL_SHARP = 0.25;
GotoDist(2.5);
- GotoThet(-3.14159);
- GotoDist(4);
+ GotoThet(-3.04);
+ R_SEUIL_SHARP = 0.35;
+ GotoDist(5.5);
R_SEUIL_SHARP = 1;
+ GotoDist(4.5);
+ GotoArr(3);
+ R_SEUIL_SHARP = 0.35;
+ GotoThet(3.04);
GotoDist(3.5);
+ GotoThet(-3.04);
+ R_SEUIL_SHARP = 1;
+ GotoDist(4.1);
}
else if (SCouleur == VIOLET) {
- end.attach(&endFonc, 60);
+ end.attach(&endFonc, 90);
GotoDist(9.0);
GotoArr(9.2);
R_SEUIL_SHARP = 0.25;
GotoDist(2.5);
- GotoThet(3.14159);
- GotoDist(4);
+ GotoThet(3.04);
+ R_SEUIL_SHARP = 0.35;
+ GotoDist(5.5);
R_SEUIL_SHARP = 1;
+ GotoDist(4.5);
+ GotoArr(4);
+ R_SEUIL_SHARP = 0.35;
+ GotoThet(-3.04);
GotoDist(3.5);
+ GotoThet(3.04);
+ R_SEUIL_SHARP = 1;
+ GotoDist(4.1);
}
else if (SCouleur == NOIR) {
TestDist3(2,2);
