carte esclave Petit Robot
Dependencies: mbed Herkulex_Library_2019 actions_Gr ident_crac actions_Pr
Capteurs/dt.h@45:3cb347342a0d, 2019-05-30 (annotated)
- Committer:
- Artiom
- Date:
- Thu May 30 04:05:18 2019 +0000
- Revision:
- 45:3cb347342a0d
- Parent:
- 43:7fff7f4d79a1
v_ jeudi 10h00 premier match
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 | 25: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 | 45:3cb347342a0d | 13 | #define Correction 50 //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 | 43:7fff7f4d79a1 | 35 | extern unsigned char DT1_interrupt_Ex; |
Artiom | 43:7fff7f4d79a1 | 36 | extern unsigned char DT2_interrupt_Ex; |
Artiom | 43:7fff7f4d79a1 | 37 | extern unsigned char DT3_interrupt_Ex; |
Artiom | 43:7fff7f4d79a1 | 38 | extern unsigned char DT4_interrupt_Ex; |
Artiom | 8:8aeb718824ea | 39 | #endif |