User Manual

Usage Examples
This library comes with two example sketches that you can load by going to File > Examples >
OrangutanAnalog. The example sketches that come with the OrangutanMotors library also make
limited use of this library.
1. OrangutanAnalogExample
Demonstrates how you can use the methods in this library to read the analog voltage of the trimmer
potentiometer in the background while the rest of your code executes. If the ADC is free, the program
starts a conversion on the TRIMPOT analog input (channel 7), and then it proceeds to execute the
rest of the code in loop() while the ADC hardware works. Polling of the isConverting() method allows
the program to determine when the conversion is complete and to update its notion of the trimpot
value accordingly. Feedback is given via the red user LED, whose brightness is made to scale with the
trimpot position.
Programming Orangutans and the 3pi Robot from the Arduino
Environment
© 2001–2019 Pololu
Corporation
5. Arduino Libraries for the Orangutan and 3pi Robot Page 33 of 66