ROBOTIC COMPETITION PARIS 2017

Dependencies:   CMPS03 mbed

Fork of _test_suivi_mur by christophe vermaelen

Revision:
9:7f62c0329849
Parent:
7:64bfecbb3000
Child:
10:1a69a6f659bd
--- a/fct.cpp	Wed May 31 12:17:59 2017 +0000
+++ b/fct.cpp	Wed May 31 16:30:10 2017 +0000
@@ -1,6 +1,15 @@
 #include "mbed.h"
 #include "fct.h"
 #include "CMPS03.h"
+void en_avant()
+{
+    sensMG.write(0);
+    sensMD.write(0);
+    cmdD=35;
+    cmdG=35;
+    MD.pulsewidth(vitesse(cmdD));
+    MG.pulsewidth(vitesse(cmdG));
+}
 void contournement()
 {
     sensMG.write(0);
@@ -59,7 +68,9 @@
     tic2.attach(&mesAN,0.01);
     echo.rise(&start_trig);
     echo.fall(&stop_trig);
+    wait(0.1);
     bearing_set=boussole.readBearing()/10.0;
+    wait(0.1);
 }
 void mesAN()
 {