Manual

5.d. 0x86 & 0x87: Motor M0 & M1 Coast
Command 0x86: Motor M0 Coast
Compact protocol: 0x86
Pololu protocol: 0xAA, device ID, 0x06
Command 0x87: Motor M1 Coast
Compact protocol: 0x87
Pololu protocol: 0xAA, device ID, 0x07
These commands will set the specified motor to coast by setting the motor outputs to high impedance, which lets
the motor turn freely. This is in contrast to setting the motor speed to 0, which sets the motor outputs to ground
and acts as a brake, resisting motor rotation.
You can see the effect of this yourself just by using your motor. First, with your motor disconnected from
anything, try rotating the output shaft and note how easily it turns. Then, short the two motor leads together and
try rotating the output shaft again. You should notice significantly more resistance while the leads are shorted
together. The motor-coast command is equivalent to disconnecting your motor and letting it turn freely while
setting the motor speed to zero is equivalent to shorting the motor leads together.
5.e. 0x88 - 0x8F: Set Motor Forward/Reverse
The qik can independently control two bidirectional brushed DC motors, driving each either forward or reverse
with either 7- or 8-bit speed resolution. In 7-bit mode, motor speed ranges from stopped to full speed as the
speed parameter ranges from 0 to 127. In 8-bit mode, motor speed ranges from stopped to full speed as the speed
parameter ranges from 0 – 255. The speed resolution can be controlled by the PWM configuration parameter (see
Section 5.c).
The motor direction convention used in this document is that “forward” corresponds to grounding the pin while
PWMing the + pin between V
MOT
and ground. “Reverse” corresponds to grounding the + pin while PWMing the
pin between V
MOT
and ground. Notions of “forward” and “reverse” are somewhat arbitrary. See Section 3.a for
information about motor and power connections.
Motor M0 Commands
Commands 0x88 0x8B apply to motor M0. In 8-bit mode, commands 0x89 and 0x8B will set the motor speed
to 128+motor speed; in 7-bit mode, command 0x89 is identical to command 0x88 and command 0x8B is identical
to command 0x8A.
For example, in 8-bit mode, the command packet 0x88, 0x7F will set motor M0 speed to 127 out of a maximum
of 255, which will result in the motor’s turning at half speed. The command packet 0x89, 0x7F will set motor M0
speed to 127+128 = 255, which will result in the motors turning at full speed. In 7-bit mode, both commands will
set motor M0 speed to 127 out of a maximum of 127, which will result in the motors turning at full speed.
Command 0x88: Motor M0 Forward
Compact protocol: 0x88, motor speed
Pololu protocol: 0xAA, device ID, 0x08, motor speed
Command 0x89: Motor M0 Forward (speed + 128; used in 8-bit mode)
Compact protocol: 0x89, motor speed
Pololu protocol: 0xAA, device ID, 0x09, motor speed
Qik 2s9v1 User's Guide © 2001–2012 Pololu Corporation
5. Serial Commands Page 18 of 24