Issue #24 resolved

Add PROGMEM reader

1e1
created an issue

Could you quickly add a createChar function which reads the charmap from the flash memory?

Thx

void LiquidCrystal::createChar_P(uint8_t location, const prog_uchar charmap[]) { location &= 0x7; lcd.command(LCD_SETCGRAMADDR | (location << 3)); for (uint8_t i = 0; i<8; i++) { lcd.write(pgm_read_byte_near(charmap++)); } }

Comments (3)

  1. F Malpartida repo owner

    This way you don't have to worry about having a different methods for character and will always use the same method regardless of where the information is located (similar to lcd::print). That's one of the nice features of C++.

  2. Log in to comment