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
Classes/Robot.h@16:05665faaa489, 2019-06-04 (annotated)
- Committer:
- Wael_H
- Date:
- Tue Jun 04 08:49:01 2019 +0000
- Revision:
- 16:05665faaa489
- Parent:
- 15:3d4543a6c100
- Child:
- 17:aae5361ddddf
tests deplacements
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Wael_H | 10:efa507ba2b35 | 1 | #ifndef ROBOT_H |
Wael_H | 10:efa507ba2b35 | 2 | #define ROBOT_H |
Wael_H | 10:efa507ba2b35 | 3 | |
Wael_H | 10:efa507ba2b35 | 4 | #include "Deplacement.h" |
Wael_H | 10:efa507ba2b35 | 5 | #include "Laser.h" |
Wael_H | 10:efa507ba2b35 | 6 | #include "Rouleau.h" |
Wael_H | 10:efa507ba2b35 | 7 | #include <string> |
Wael_H | 10:efa507ba2b35 | 8 | |
Wael_H | 10:efa507ba2b35 | 9 | using namespace std; |
Wael_H | 10:efa507ba2b35 | 10 | |
Wael_H | 10:efa507ba2b35 | 11 | class Robot |
Wael_H | 10:efa507ba2b35 | 12 | { |
Wael_H | 10:efa507ba2b35 | 13 | public: |
Wael_H | 10:efa507ba2b35 | 14 | Robot(); |
Wael_H | 10:efa507ba2b35 | 15 | bool aBalle(); |
Wael_H | 16:05665faaa489 | 16 | void getPos(short*); |
Wael_H | 16:05665faaa489 | 17 | bool getFlag(); |
Wael_H | 13:9c62e263f245 | 18 | |
Wael_H | 10:efa507ba2b35 | 19 | // Déplacements // |
Wael_H | 15:3d4543a6c100 | 20 | bool avance(signed short=2500); |
Wael_H | 15:3d4543a6c100 | 21 | bool tourne(signed short=3600); |
Wael_H | 15:3d4543a6c100 | 22 | bool GoToXYT(unsigned short, unsigned short, unsigned short, signed char sens=0); |
Wael_H | 15:3d4543a6c100 | 23 | void setSpeed(unsigned short vitesse, unsigned short acceleration) const; |
Wael_H | 13:9c62e263f245 | 24 | void stop(); |
Wael_H | 13:9c62e263f245 | 25 | |
Wael_H | 10:efa507ba2b35 | 26 | // Lasers // |
Wael_H | 13:9c62e263f245 | 27 | float getDist(int, string unite="cm"); |
Wael_H | 13:9c62e263f245 | 28 | |
Wael_H | 10:efa507ba2b35 | 29 | // Rouleau // |
Wael_H | 10:efa507ba2b35 | 30 | void ejecte(int); |
Wael_H | 10:efa507ba2b35 | 31 | void gobe(int); |
Wael_H | 10:efa507ba2b35 | 32 | void stopRouleau(); |
Wael_H | 10:efa507ba2b35 | 33 | |
Wael_H | 10:efa507ba2b35 | 34 | private: |
Wael_H | 10:efa507ba2b35 | 35 | Deplacement deplacement; |
Wael_H | 10:efa507ba2b35 | 36 | Laser laserG, laserD, laserA; //Lasers télémétriques du Robot |
Wael_H | 10:efa507ba2b35 | 37 | Rouleau rouleau; |
Wael_H | 10:efa507ba2b35 | 38 | DigitalIn BPs; |
Wael_H | 10:efa507ba2b35 | 39 | }; |
Wael_H | 10:efa507ba2b35 | 40 | |
Wael_H | 10:efa507ba2b35 | 41 | #endif //ROBOT_H |