beautypg.com

Command 0x8c (140): motor m1 forward, Command 0x8e (142): motor m1 reverse, G. 0x90 & 0x91: get motor m0 & m1 current – Pololu Qik 2s12v10 User Manual

Page 27: Command 0x90 (144): get motor m0 current, Command 0x91 (145): get motor m1 current, H. 0x92 & 0x93: get motor m0 & m1 speed, Command 0x92 (146): get motor m0 speed, Command 0x93 (147): get motor m1 speed

background image

= 255, which turns the motor at full speed. In 7-bit mode, both commands set motor M1 speed to 127 out of a
maximum of 127, which turns the motor at full speed.

Command 0x8C (140):

Motor M1 Forward

Compact protocol: 0x8C, motor speed
Pololu protocol: 0xAA, device ID, 0x0C, motor speed

Command 0x8D (141):

Motor M1 Forward (speed + 128; used in 8-bit mode)

Compact protocol: 0x8D, motor speed
Pololu protocol: 0xAA, device ID, 0x0D, motor speed

Command 0x8E (142):

Motor M1 Reverse

Compact protocol: 0x8E, motor speed
Pololu protocol: 0xAA, device ID, 0x0E, motor speed

Command 0x8F (143):

Motor M1 Reverse (speed + 128; used in 8-bit mode)

Compact protocol: 0x8F, motor speed
Pololu protocol: 0xAA, device ID, 0x0F, motor speed

5.g. 0x90 & 0x91: Get Motor M0 & M1 Current
Command 0x90 (144):

Get Motor M0 Current

Compact protocol: 0x90
Pololu protocol: 0xAA, device ID, 0x10

Command 0x91 (145):

Get Motor M1 Current

Compact protocol: 0x91
Pololu protocol: 0xAA, device ID, 0x11

These commands return 8-bit representations of the average motor currents over the last 5 ms. To convert the
returned value to an approximate current, multiply it by 150 mA. Please note that the actual current could differ
from this value by as much as 20%, so you might consider empirically characterizing the current feedback from
each motor driver to obtain a more accurate relationship between the values returned by this command and the
actual driver output current.

5.h. 0x92 & 0x93: Get Motor M0 & M1 Speed
Command 0x92 (146):

Get Motor M0 Speed

Compact protocol: 0x92
Pololu protocol: 0xAA, device ID, 0x12

Command 0x93 (147):

Get Motor M1 Speed

Compact protocol: 0x93
Pololu protocol: 0xAA, device ID, 0x13

These commands return the present motor speeds, which can be useful in determining the current state of an
accelerating motor or the speed that results from active current limiting. Please note that this command returns the
speeds to which the qik is trying to set the motors, not necessarily their actual speeds. For example, if the qik is
trying to drive a stalled motor at full speed, the returned speed might be 255 (0xFF) even though the actual motor

Qik 2s12v10 User's Guide

© 2001–2012 Pololu Corporation

5. Serial Parameters and Commands

Page 27 of 33