3.a.07. Command 208: Set Acceleration

Effect: Sets for the specified motor the acceleration used by the motor acceleration commands 228 (Section 3.a.06) and 232 (Section 3.a.04). While accelerating, the net effect is that the PWM is incremented by the acceleration value every 100 ms. In reality, the updates will usually be increments of the one tenth the acceleration value applied every 10 ms. The acceleration value for each motor is specified by a seven-bit number and will change the duty cycle twice as quickly in seven-bit PWM mode as in eight-bit PWM mode. An acceleration value of zero is treated as infinite acceleration and will simply set the PWM equal to the target PWM when the motor-handling portion of the mega168’s main loop is executed sometime in the next 10ms.

This command does not save the acceleration values to EEPROM, however they can be saved by issuing separate EEPROM-write commands (240—Section 3.d.02) that store the values at the appropriate addresses (9 for motor 1, 10 for motor 2). It is possible to safely store 8-bit values at these location if you need even higher accelerations than 127.

Values sent: motor acceleration (7 bits), motor (1 bit)

command byte = 208 | motor bit

data byte = 7-bit acceleration (MSB always zero)

Related Products

Orangutan X2 with VNH3
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors