Implement speedometer and encoder
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user