AVR Library Command Reference

Reference
C++ and Arduino methods are shown in red.
C functions are shown in green.
static void OrangutanMotors::setM1Speed(int speed)
void set_m1_speed(int speed)
This method will set the speed and direction of motor 1. Speed is a value between -255 and +255. The sign of
speed determines the direction of the motor and the magnitude determines the speed. speed = 0 results in full
brake while speed = 255 or -255 results in maximum speed forward or backward. If a speed greater than 255 is
supplied, the motor speed will be set to 255. If a speed less than -255 is supplied, the motor speed will be set to
-255.
static void OrangutanMotors::setM2Speed(int speed)
void set_m2_speed(int speed)
This method will set the speed and direction of motor 2.
static void OrangutanMotors::setSpeeds(int m1Speed, int m2Speed)
void set_motors(int m1, int m2)
This method will set the speeds and directions of motors 1 and 2.
Pololu AVR Library Command Reference © 2001–2009 Pololu Corporation
7. Orangutan Motor Control Page 19 of 35