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 OrangutanLCD::clear()
void clear()
Clears the display and returns the cursor to the upper-left corner (0, 0).
void OrangutanLCD::initPrintf()
void lcd_init_printf()
Initializes the display for use with the standard C function printf(). This is not available in the Arduino
environment. See the avr-libc manual [http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html] for more
information on how to use printf with an AVR, and please note that using printf() will consume a significant
amount of your Orangutan’s resources.
static void OrangutanLCD::print(unsigned char character)
Prints a single ASCII character to the display at the current cursor position.
static void OrangutanLCD::print(char character)
void print_character(char character)
Prints a single ASCII character to the display at the current cursor position. This is the same as the unsigned char
version above.
Example:
OrangutanLCD::print('A');
static void OrangutanLCD::print(const char *str)
void print(const char *str)
Prints a zero-terminated string of ASCII characters to the display starting at the current cursor position. The string
will not wrap or otherwise span lines.
Example:
OrangutanLCD::print("Hello!");
static void OrangutanLCD::printFromProgramSpace(const char *str)
void print_from_program_space(const char *str)
Prints a string stored in program memory. This can help save a few bytes of RAM for each message that your
program prints. Even if you use the normal print() function, the strings will be initially stored in program space
anyway, so it should never hurt you to use this function.
Example:
#include <avr/pgmspace.h>
const char message[] PROGMEM = "Hello!";
void someFunction()
{
OrangutanLCD::printFromProgramSpace(message);
}
static void OrangutanLCD::print(int value)
Prints the specified signed integer (2-byte) value to the display at the current cursor position. It will not wrap or
otherwise span lines. There is no C version of this method, but print_long(value) should be sufficient.
Pololu AVR Library Command Reference © 2001–2009 Pololu Corporation
5. Orangutan LCD Page 13 of 35










