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
9. Orangutan Serial Port Communication
The OrangutanSerial class and the C functions in this section provide access to the serial port on the Baby
Orangutan B, Orangutan SV-168, Orangutan LV-168, and 3pi. This allows two-way, TTL-level communication on
pins PD0 (RX) and PD1 (TX) with another microcontroller, a serial device, or (through a USB-serial adapter or
RS-232 level converter) a laptop or desktop computer. These functions are not available within the Arduino
environment, which has its own serial functions.
When sending data, a USART_UDRE_vect interrupt vector is called after each byte is sent, allowing the library to
automatically start sending the next byte from the send buffer. When receiving data, a USART_RX_vect interrupt
vector is called after each byte is received, allowing the library to automatically store the byte in the receive buffer.
To use a polling method instead of interrupts, see the setMode() and check() functions below.
For a higher level overview of this library and programs that show how this library can be used, please see Section
6.j of the Pololu AVR C/C++ Library User’s Guide [http://www.pololu.com/docs/0J20].
Pololu AVR Library Command Reference © 2001–2009 Pololu Corporation
9. Orangutan Serial Port Communication Page 22 of 35










