![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ROBOTIC COMPETITION PARIS 2017
Fork of _test_suivi_mur by
Diff: fct.cpp
- Revision:
- 12:6151eb503170
- Parent:
- 10:1a69a6f659bd
- Child:
- 13:4fdd8ad91c69
diff -r cb477f6ec781 -r 6151eb503170 fct.cpp --- a/fct.cpp Thu Jun 01 08:18:04 2017 +0000 +++ b/fct.cpp Thu Jun 01 09:30:37 2017 +0000 @@ -1,6 +1,15 @@ #include "mbed.h" #include "fct.h" #include "CMPS03.h" +void rotation_sharp() +{ + sensMG.write(0); + sensMD.write(1); + cmdD=30; + cmdG=30; + MD.pulsewidth(vitesse(cmdD)); + MG.pulsewidth(vitesse(cmdG)); +} void en_avant() { sensMG.write(0); @@ -12,10 +21,10 @@ } void contournement() { - sensMG.write(1); + sensMG.write(0); sensMD.write(0); - cmdD=30; - cmdG=30; + cmdD=35; + cmdG=15; MD.pulsewidth(vitesse(cmdD)); MG.pulsewidth(vitesse(cmdG)); @@ -23,9 +32,9 @@ void rotation_horaire() { sensMG.write(0); - sensMD.write(1); - cmdD=30; - cmdG=30; + sensMD.write(0); + cmdD=15; + cmdG=35; MD.pulsewidth(vitesse(cmdD)); MG.pulsewidth(vitesse(cmdG)); }