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.
Fork of _test_suivi_mur by
fct.h@2:82b72fa8dbcd, 2017-05-28 (annotated)
- Committer:
- vermaelen
- Date:
- Sun May 28 17:36:57 2017 +0000
- Revision:
- 2:82b72fa8dbcd
- Child:
- 3:b91371837109
V1;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vermaelen | 2:82b72fa8dbcd | 1 | #ifndef FCT_H |
vermaelen | 2:82b72fa8dbcd | 2 | #define FCT_H |
vermaelen | 2:82b72fa8dbcd | 3 | //GLOBALES |
vermaelen | 2:82b72fa8dbcd | 4 | extern BusOut leds; |
vermaelen | 2:82b72fa8dbcd | 5 | extern DigitalOut trigger1; |
vermaelen | 2:82b72fa8dbcd | 6 | extern DigitalOut trigger2; |
vermaelen | 2:82b72fa8dbcd | 7 | extern DigitalOut trigger3; |
vermaelen | 2:82b72fa8dbcd | 8 | extern InterruptIn echo; |
vermaelen | 2:82b72fa8dbcd | 9 | extern AnalogIn AnaG; |
vermaelen | 2:82b72fa8dbcd | 10 | extern AnalogIn AnaAV; |
vermaelen | 2:82b72fa8dbcd | 11 | extern PwmOut MG; //vitesse moteur gauche |
vermaelen | 2:82b72fa8dbcd | 12 | extern PwmOut MD; //vitesse moteur droit |
vermaelen | 2:82b72fa8dbcd | 13 | extern DigitalOut sensMG; // sens moteur gauche |
vermaelen | 2:82b72fa8dbcd | 14 | extern DigitalOut sensMD; // sens moteur droit |
vermaelen | 2:82b72fa8dbcd | 15 | extern Timer temp,t; |
vermaelen | 2:82b72fa8dbcd | 16 | extern Ticker tic1,tic2; |
vermaelen | 2:82b72fa8dbcd | 17 | |
vermaelen | 2:82b72fa8dbcd | 18 | extern int drap,flag1,flag2,flag3,flag4,flag5; |
vermaelen | 2:82b72fa8dbcd | 19 | extern float US1,US2,US3,AN1,AN2,US1_av,US2_av,US3_av,AN1_av,AN2_av; |
vermaelen | 2:82b72fa8dbcd | 20 | extern float E_av,E,iE; |
vermaelen | 2:82b72fa8dbcd | 21 | extern float cmdG,cmdD; |
vermaelen | 2:82b72fa8dbcd | 22 | extern int etat; |
vermaelen | 2:82b72fa8dbcd | 23 | extern float iecart,ecart_av,ecart; |
vermaelen | 2:82b72fa8dbcd | 24 | |
vermaelen | 2:82b72fa8dbcd | 25 | |
vermaelen | 2:82b72fa8dbcd | 26 | //CONSTANTES |
vermaelen | 2:82b72fa8dbcd | 27 | #define PERIOD 0.0001 |
vermaelen | 2:82b72fa8dbcd | 28 | #define VMOY 30 |
vermaelen | 2:82b72fa8dbcd | 29 | #define VMAX 60 |
vermaelen | 2:82b72fa8dbcd | 30 | #define Kp_E 0.42 |
vermaelen | 2:82b72fa8dbcd | 31 | #define Kp_ecart 0.8 |
vermaelen | 2:82b72fa8dbcd | 32 | #define Td_ecart 0.0 |
vermaelen | 2:82b72fa8dbcd | 33 | #define Ti_ecart 1000.0 |
vermaelen | 2:82b72fa8dbcd | 34 | #define limitmin 3 |
vermaelen | 2:82b72fa8dbcd | 35 | #define limitmax 150 |
vermaelen | 2:82b72fa8dbcd | 36 | #define Te 0.001 |
vermaelen | 2:82b72fa8dbcd | 37 | #define Ti 2.0 |
vermaelen | 2:82b72fa8dbcd | 38 | #define a 24.0 |
vermaelen | 2:82b72fa8dbcd | 39 | #define b 0.1 |
vermaelen | 2:82b72fa8dbcd | 40 | //PROTOTYPES |
vermaelen | 2:82b72fa8dbcd | 41 | void stopMotor(); |
vermaelen | 2:82b72fa8dbcd | 42 | void suivi_mur(); |
vermaelen | 2:82b72fa8dbcd | 43 | void rotation_horaire(); |
vermaelen | 2:82b72fa8dbcd | 44 | void init(); |
vermaelen | 2:82b72fa8dbcd | 45 | void asservissement(); |
vermaelen | 2:82b72fa8dbcd | 46 | void fcttrig(); |
vermaelen | 2:82b72fa8dbcd | 47 | float vitesse(float); |
vermaelen | 2:82b72fa8dbcd | 48 | void start(); |
vermaelen | 2:82b72fa8dbcd | 49 | void stop(); |
vermaelen | 2:82b72fa8dbcd | 50 | float vitesse(float); |
vermaelen | 2:82b72fa8dbcd | 51 | void mesAN(); |
vermaelen | 2:82b72fa8dbcd | 52 | |
vermaelen | 2:82b72fa8dbcd | 53 | #endif |