carte esclave Petit Robot
Dependencies: mbed Herkulex_Library_2019 actions_Gr ident_crac actions_Pr
Capteurs/dt.h@10:48c0d1b8aed9, 2019-05-18 (annotated)
- Committer:
- Artiom
- Date:
- Sat May 18 12:07:01 2019 +0000
- Revision:
- 10:48c0d1b8aed9
- Parent:
- 8:8aeb718824ea
- Child:
- 25:9627700d989f
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Artiom | 8:8aeb718824ea | 1 | #ifndef DT_H |
Artiom | 8:8aeb718824ea | 2 | #define DT_H |
Artiom | 8:8aeb718824ea | 3 | |
Artiom | 8:8aeb718824ea | 4 | |
Artiom | 8:8aeb718824ea | 5 | #define V_min 0.561 //Tension (V) minimale prélevée sur la résistance |
Artiom | 8:8aeb718824ea | 6 | #define V_max 3.282 //Tension (V) maximale prélevée sur la résistance |
Artiom | 8:8aeb718824ea | 7 | |
Artiom | 8:8aeb718824ea | 8 | #define D_min 50 //Distance (mm) minimale mesurée par le capteur |
Artiom | 8:8aeb718824ea | 9 | #define D_max 1500 //Distance (mm) maximale mesurée par le capteur |
Artiom | 8:8aeb718824ea | 10 | |
Artiom | 8:8aeb718824ea | 11 | #define Nb_echantillon 5 //Nombre de valeurs utilisées pour le moyennage |
Artiom | 8:8aeb718824ea | 12 | |
Artiom | 8:8aeb718824ea | 13 | #define Correction 0 //Correction apportée sur la formule |
Artiom | 8:8aeb718824ea | 14 | |
Artiom | 8:8aeb718824ea | 15 | #define D_ROULEAU_AXE 200 |
Artiom | 8:8aeb718824ea | 16 | |
Artiom | 8:8aeb718824ea | 17 | #define Conv (V_max - V_min)/((V_max/3.3)-(V_min/3.3)) |
Artiom | 8:8aeb718824ea | 18 | |
Artiom | 8:8aeb718824ea | 19 | #define A (D_max - D_min)/(V_max - V_min)*Conv |
Artiom | 8:8aeb718824ea | 20 | #define B (D_max - ((D_max - D_min)/(V_max - V_min))*V_max) + Correction |
Artiom | 8:8aeb718824ea | 21 | |
Artiom | 8:8aeb718824ea | 22 | |
Artiom | 8:8aeb718824ea | 23 | |
Artiom | 8:8aeb718824ea | 24 | |
Artiom | 8:8aeb718824ea | 25 | void f_mesure(void); |
Artiom | 8:8aeb718824ea | 26 | double mediane(double* buff_med, int size_med); |
Artiom | 8:8aeb718824ea | 27 | void tri(double* tab, int size); |
Artiom | 10:48c0d1b8aed9 | 28 | void interrupt(void); |
Artiom | 8:8aeb718824ea | 29 | |
Artiom | 8:8aeb718824ea | 30 | extern double DT1_trait_Ex; |
Artiom | 8:8aeb718824ea | 31 | extern double DT2_trait_Ex; |
Artiom | 8:8aeb718824ea | 32 | extern double DT3_trait_Ex; |
Artiom | 8:8aeb718824ea | 33 | extern double DT4_trait_Ex; |
Artiom | 10:48c0d1b8aed9 | 34 | |
Artiom | 10:48c0d1b8aed9 | 35 | extern bool DT1_interrupt_Ex; |
Artiom | 10:48c0d1b8aed9 | 36 | extern bool DT2_interrupt_Ex; |
Artiom | 10:48c0d1b8aed9 | 37 | extern bool DT3_interrupt_Ex; |
Artiom | 10:48c0d1b8aed9 | 38 | extern bool DT4_interrupt_Ex; |
Artiom | 8:8aeb718824ea | 39 | #endif |