User Manual

Programming Orangutans and the
3pi Robot from the Arduino
Environment
View document on multiple pages. [https://www.pololu.com/docs/0J17]
View this document as a printable PDF: orangutan_arduino.pdf [https://www.pololu.com/docs/pdf/0J17/
orangutan_arduino.pdf]
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. ATmega168/328-Arduino Pin Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.a. Orangutan SV-xx8 and LV-168 Pin Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.b. Baby Orangutan B Pin Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.c. 3pi Robot Pin Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3. Configuring the Arduino Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4. Using the Arduino IDE: Blinking an LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5. Arduino Libraries for the Orangutan and 3pi Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.a. OrangutanAnalog - Analog Input Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.b. OrangutanBuzzer - High-Level Buzzer Control Library . . . . . . . . . . . . . . . . . . . . . . . 31
5.c. OrangutanLCD - LCD Control Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.d. OrangutanLEDs - LED Control Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.e. OrangutanMotors - Motor Control Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.f. OrangutanPushbuttons - Pushbutton Interface Library . . . . . . . . . . . . . . . . . . . . . . . . 51
5.g. Pololu3pi - Sensor Library for the 3pi Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Programming Orangutans and the 3pi Robot from the Arduino Environment © 2001–2015 Pololu Corporation
https://www.pololu.com/docs/0J17/all Page 1 of 57

Summary of content (57 pages)