User Manual

Note: the clear() method must be called before these characters are used.
The pointer picture_ptr must be a pointer to an 8 byte array in program space containing the picture data. Bit
0 of byte 0 is the upper-right pixel of the 5×8 character, and bit 4 of byte 7 is the lower-left pixel. The example
below demonstrates how to construct this kind of array.
Example:
#include <avr/pgmspace.h>
// the PROGMEM macro comes from the pgmspace.h header file
// and causes the smile pointer to point to program memory instead
// of RAM
const char smile[] PROGMEM = {
0b00000,
0b01010,
0b01010,
0b01010,
0b00000,
0b10001,
0b01110,
0b00000
};
void setup()
{
// set character 3 to a smiley face
lcd_load_custom_character(smile, 3);
// in C++: OrangutanLCD::loadCustomCharacter(smile, 3);
// clear the lcd (this must be done before we can use the above character)
clear();
// in C++: OrangutanLCD::clear();
// display the character
print_character(3);
// in C++: OrangutanLCD::print((char)3);
}
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation
5. Orangutan LCD Page 24 of 65