Updated for the next revision of the motor board
Diff: MotorShield.cpp
- Revision:
- 7:e3a2ade56b79
- Parent:
- 5:d2dffc88e94d
- Child:
- 8:e8985e8e9146
--- a/MotorShield.cpp Wed Aug 26 19:35:02 2020 +0000 +++ b/MotorShield.cpp Wed Aug 26 23:42:07 2020 +0000 @@ -77,6 +77,19 @@ } } +uint32_t MotorShield::readCurrentA() { + return readADC1(0); +} +uint32_t MotorShield::readCurrentB() { + return readADC1(1); +} +uint32_t MotorShield::readCurrentC() { + return readADC2(1); +} +uint32_t MotorShield::readCurrentD() { + return readADC2(0); +} + void MotorShield::changePeriod(int periodTicks){ periodTickVal = periodTicks; init();