...

Dependencies:   mbed

Committer:
vermaelen
Date:
Mon May 29 12:01:43 2017 +0000
Revision:
3:b91371837109
Parent:
2:82b72fa8dbcd
Child:
4:78a9354fcee8
suivi avec etat de contournement

Who changed what in which revision?

UserRevisionLine numberNew 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 3:b91371837109 15 extern Timer temp,t,t2;
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 3:b91371837109 19 extern float US1,US2,US3,AN1,AN2,US1_av,US2_av,US3_av,AN1_av,AN2_av;
vermaelen 3:b91371837109 20 extern float E_av,E,iE,E0,E1,E2,E3;
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 3:b91371837109 28 #define VMOY 25
vermaelen 2:82b72fa8dbcd 29 #define VMAX 60
vermaelen 3:b91371837109 30 #define Kp_dist 0.0
vermaelen 3:b91371837109 31 #define Kp_ecart 0.2
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 3:b91371837109 41 void contournement();
vermaelen 2:82b72fa8dbcd 42 void stopMotor();
vermaelen 2:82b72fa8dbcd 43 void suivi_mur();
vermaelen 2:82b72fa8dbcd 44 void rotation_horaire();
vermaelen 2:82b72fa8dbcd 45 void init();
vermaelen 2:82b72fa8dbcd 46 void asservissement();
vermaelen 2:82b72fa8dbcd 47 void fcttrig();
vermaelen 2:82b72fa8dbcd 48 float vitesse(float);
vermaelen 2:82b72fa8dbcd 49 void start();
vermaelen 2:82b72fa8dbcd 50 void stop();
vermaelen 2:82b72fa8dbcd 51 float vitesse(float);
vermaelen 2:82b72fa8dbcd 52 void mesAN();
vermaelen 2:82b72fa8dbcd 53
vermaelen 2:82b72fa8dbcd 54 #endif