christophe vermaelen
/
TEST_ASSER_MOT_ENCODEUR_V2
pour bastos
Diff: lib.h
- Revision:
- 0:e2ce7aa2a4a4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib.h Wed Apr 06 12:25:35 2022 +0000 @@ -0,0 +1,38 @@ +#define Te 0.001 +#define Ti 1000 +#define K 5.0 +#define A 0.3 +#define V 1.5 +#define mmPULSE 1.487 +#define ENTREAXE 722.56//*(1+(4.185/360)) +#define DELAY 1 +#include "mbed.h" +#include "math.h" +#define DEBUG 0 //1 affiche les printf, 0 n'affiche rien +extern Timer temps; +extern int cptG; +extern int cptD; +extern DigitalOut sensG; +extern DigitalOut sensD; +extern PwmOut motG; +extern PwmOut motD; +extern InterruptIn AG,AD; +extern DigitalIn BG,BD; +extern Ticker tic,tac; +extern int cPosG,cPosD; +extern int erD,somErD; +extern int erG,somErG; +extern int cmdG,cmdD; +extern float cPos; +void distance(int); +void rotation(int); +void init(); +int borne(int); +void mot(int,int); +void asserPos(); + +void countGr(); +void countDr(); +void countGf(); +void countDf(); +void aff(); \ No newline at end of file