User Manual
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).
static 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 program and data memory. This function is intended to work with the LCD that
came with your Orangutan; if you are using a different LCD, you can use lcd_init_printf_with_dimensions()
to initialize printf() for the width and height of your LCD. This function only needs to be called once in your
program, prior to any printf() calls.
Example
#include <stdio.h>
void someFunction(int x)
{
lcd_init_printf();
// in C++: OrangutanLCD::initPrintf();
printf("x=%5d", x);
}
static void OrangutanLCD::initPrintf(unsigned char lcd_width, unsigned char lcd_height)
void lcd_init_printf_with_dimensions(unsigned char lcd_width, unsigned char lcd_height)
Initializes the display for use with the standard C function printf() and lets you specify the width and height
of your LCD using the lcd_width and lcd_height arguments. 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 program and data memory. If you are using the LCD that came with your Orangutan, you
can use the argument-free lcd_init_printf(), which automatically initializes printf() for the width and height of
your Orangutan’s (or 3pi’s) LCD. This version of the function is useful if you are using a different LCD or
for some reason only want to use a portion of your LCD. This function only needs to be called oncce in your
program, prior to any printf() calls.
Example
#include <stdio.h>
void someFunction(int x)
{
// initialize printf() for a 20x4 character LCD
lcd_init_printf_with_dimensions(20, 4);
// in C++: OrangutanLCD::initPrintf(20, 4);
printf("x=%5d", x);
}
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)
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation
5. Orangutan LCD Page 21 of 65