Implement speedometer and encoder

This commit is contained in:
2021-04-01 14:37:47 +02:00
parent e798f0904c
commit fd44f84738
10 changed files with 196 additions and 63 deletions
+19
View File
@@ -0,0 +1,19 @@
#include "wheelEncoder.h"
WheelEncoder::WheelEncoder() {
}
void WheelEncoder::initEncoder(uint8_t pinA, uint8_t pinB) {
this->pinA = pinA;
this->pinB = pinB;
pinMode(this->pinA, INPUT_PULLDOWN);
pinMode(this->pinB, INPUT_PULLDOWN);
}
int64_t WheelEncoder::getCount() {
return this->count;
}