AVR Library Command Reference
Table Of Contents
- Pololu AVR Library Command Reference
- 1. Introduction
- 2. Timing and Delays
- Reference
- 3. Orangutan Analog-to-Digital Conversion
- Reference
- 4. Orangutan Buzzer: Beeps and Music
- Reference
- 5. Orangutan LCD
- Reference
- 6. Orangutan LEDs
- Reference
- 7. Orangutan Motor Control
- Reference
- 8. Orangutan Pushbuttons
- Reference
- 9. Orangutan Serial Port Communication
- Reference
- 10. Orangutan System Resources
- 11. QTR Reflectance Sensors
- Reference
- 12. 3pi Robot Functions
- 13. Wheel Encoders
- 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










