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: mbed RC_Servo VMA306 PID CNY70 CMPS03 GP2A Pixy
Revision 5:6afed0e241cb, committed 2018-06-05
- Comitter:
- haarkon
- Date:
- Tue Jun 05 08:02:56 2018 +0000
- Parent:
- 4:5038b4cd1088
- Child:
- 6:ebc5b5ad56d4
- Commit message:
- untested;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Jun 05 07:29:54 2018 +0000
+++ b/main.cpp Tue Jun 05 08:02:56 2018 +0000
@@ -10,7 +10,7 @@
#define PI 3.1415926535898
Serial pc (PA_2, PA_3, 921600);
-PID motor (TIM4, TIM3, PA_9, PA_8, PC_9, PC_8, PC_6, PC_5);
+//PID motor (TIM4, TIM3, PA_9, PA_8, PC_9, PC_8, PC_6, PC_5);
CMPS03 boussole (PC_4);
@@ -47,7 +47,7 @@
led2 = 0;
disquette = 0;
- motor.resetPosition();
+ //motor.resetPosition();
wait (5);
@@ -67,7 +67,7 @@
pc.printf("\rGP2 courte distance = %5.2f\n",sd1.getDistance ());
pc.printf("\rpos = %2.1lf\n",pos);
- /*ballon.write (pos);
+ ballon.write (pos);
verrou.write (pos);
nbiter++;
if (nbiter%5==0) {
@@ -78,7 +78,7 @@
pos-=0.1;
if (pos<0.1) sens = 1;
}
- }*/
+ }
if (UltraSon.isUSGReady()) pc.printf ("\rusG = %5.2lf -", UltraSon.readUSG());
if (UltraSon.isUSBReady()) pc.printf ("\r\t\t usB = %5.2lf -", UltraSon.readUSB());
@@ -101,7 +101,7 @@
}
// Square danse !!!
- motor.getPosition (&x,&y, &theta);
+ /*motor.getPosition (&x,&y, &theta);
switch (etatmvt) {
case 0 :
// On avance de 50cm (coordonnés X = 500, Y = 0)
@@ -144,7 +144,7 @@
if (theta <= 0) etatmvt = 0;
break;
}
-
+*/
pc.printf ("\n");
led1 = !led1;
led2 = !led2;