command(LCD_SETCGRAMADDR | (location << 3));
- for (int
i=0; i <8; i++)
+ for (int0; i8; i++)
write(charmap[i]); // call the virtual write method
+void LCD::createChar(uint8_t location, const prog_uchar charmap)
+ location &= 0x7; // we only have 8 memory locations 0-7
+ command(LCD_SETCGRAMADDR | (location << 3));
+ for (uint8_t i = 0; i < 8; i++)
// Switch on the backlight
void LCD::backlight ( void )
@param charmap[in] the bitmap array representing each row of the character.
void createChar(uint8_t location, uint8_t charmap);
+ @abstract Creates a custom character for use on the LCD.
+ @discussion Create a custom character (glyph) for use on the LCD.
+ Most chipsets only support up to eight characters of 5x8 pixels. Therefore,
+ this methods has been limited to locations (numbered 0 to 7).
+ The appearance of each custom character is specified by an array of eight
+ bytes, one for each row. The five least significant bits of each byte
+ determine the pixels in that row. To display a custom character on screen,
+ write()/print() its number, i.e. lcd.print (char(x)); // Where x is 0..7.
+ This method take the character defined in program memory.
+ @param location[in] LCD memory location of the character to create
+ @param charmap[in] the bitmap array representing each row of the character.
+ void createChar(uint8_t location, const prog_uchar charmap);