![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
carte esclave petit robot
Dependencies: mbed Herkulex_Library_2019 actions_Gr ident_crac actions_Pr
Capteurs/dt.h@41:832128353732, 2019-05-25 (annotated)
- Committer:
- Artiom
- Date:
- Sat May 25 15:15:30 2019 +0000
- Revision:
- 41:832128353732
- Parent:
- 27: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 |
kyxstark | 27:9627700d989f | 3 | #include "main.h" |
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 | 41:832128353732 | 35 | extern unsigned char DT1_interrupt_Ex; |
Artiom | 41:832128353732 | 36 | extern unsigned char DT2_interrupt_Ex; |
Artiom | 41:832128353732 | 37 | extern unsigned char DT3_interrupt_Ex; |
Artiom | 41:832128353732 | 38 | extern unsigned char DT4_interrupt_Ex; |
Artiom | 41:832128353732 | 39 | #endif |