#include "libencodeur.h"
CStateMachineRotaryWithSpeed encoder1(A0,A1);
void setup(){
Serial.begin(115200);
}
void loop() {
encoder1.clock();
encoder1.getPosition();
unsigned int periodiciteTache1=100;
static unsigned long timerTache1 = millis();
if (millis() - timerTache1 >= periodiciteTache1) {
timerTache1 += periodiciteTache1;
Serial.println(encoder1.getSpeed());
Serial.println(encoder1.getPosition());
}
}