
Current speed
Category
motor-specific
Offset
6
Type
signed 16-bit
Range
−800 to 800
Default
0
Command
Set speed
Set all speeds
Set all speeds using buffers
Arduino library
void setSpeed(uint8_t motor, int16_t speed)
void setSpeedNow(uint8_t motor, int16_t speed)
void setAllSpeeds(int16_t speed1, ...)
void setAllSpeedsNow(int16_t speed1, ...)
void setAllSpeedsUsingBuffers()
void setAllSpeedsNowUsingBuffers()
void getCurrentSpeed(uint8_t motor)
This is the speed that the Motoron is currently trying to apply to the motor.
• A value of 0 means the motor is braking (both outputs driving low), coasting (both outputs
disabled), or something in between, as determined by the
variable
and the hardware limitations of the controller.
• A value of 800 corresponds to the MxA output driving high (VIN) and the MxB output
driving low (GND). This direction is called
forward
, and causes the
green
motor
indicator LED to turn on.
• A value of −800 corresponds to the MxA output driving low (0 V) and the MxB output
driving high (VIN). This direction is called
reverse
, and causes the
red
motor indicator
LED to turn on.
• Intermediate values correspond to rapidly switching the motor outputs between braking
and driving the motor in the specified direction.
Pololu Motoron Motor Controller User’s Guide
© 2001–2022 Pololu Corporation
8. Variable reference
Page 44 of 67