uyvli
Fork of PololuQik2 by
Diff: PololuQik2.cpp
- Revision:
- 4:33ca85c52dc0
- Parent:
- 2:25c41766d768
--- a/PololuQik2.cpp Sat Apr 05 07:25:28 2014 +0000 +++ b/PololuQik2.cpp Sat Apr 12 20:25:58 2014 +0000 @@ -41,6 +41,18 @@ errorPin.rise(ErrorFunction); } +uint8_t PololuQik2::GetMotor0Current() { + unsigned char message[] = { MOTOR0CURRENTPACKET }; + sendMessage(message , 1); + return readByte(); +} + +uint8_t PololuQik2::GetMotor1Current() { + unsigned char message[] = { MOTOR1CURRENTPACKET }; + sendMessage(message , 1); + return readByte(); +} + void PololuQik2::begin() { serialConnection.baud(38400); wait_ms(100); // Allow Serial baud rate to propagate