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
main.cpp
- Committer:
- Wael_H
- Date:
- 2019-05-23
- Revision:
- 10:efa507ba2b35
- Parent:
- 9:2113adf37c66
- Child:
- 11:e8c4a1c6553d
- Child:
- 13:9c62e263f245
File content as of revision 10:efa507ba2b35:
#include "mbed.h" #include "CAN_asser.h" #include "Robot.h" /*//Bonus fin de partie PwmOut bonus(PA_10); //Disquette PwmOut Servo_Ballon(PB_7); PwmOut Mot_Ballon(PB_6);*/ void automate_test(Robot& R); int main(void) { Robot robot; while(1) automate_test(robot); } void automate_test(Robot& R) { typedef enum {AVANCE, TOURNE} type_etat; static type_etat etat = AVANCE; switch(etat) { case AVANCE: if(R.avance(500)) etat = TOURNE; break; case TOURNE: if(R.tourne(900)) etat = AVANCE; break; } }