Table of Contents

IclcdCreateChar()

IclcdCreateChar() registers a custom character.

IclcdCreateChar command operation flow

bool IclcdCreateChar(uint8_t location, const uint8_t charmap[8], uint8_t device = 0)

Commands

Command Arguments Return Value Operation
IclcdCreateChar(location, charmap, device) uint8_t location
const uint8_t charmap[8]
uint8_t device = 0
bool Registers a custom character.

Example

This example connects a 20×4 PCF8574 character LCD at address 0x27 to the MPAINO-8A8R(T) I2C port. Change the IclcdBegin() arguments if your LCD has a different address or size.

const uint8_t heart[8] = {0, 10, 31, 31, 14, 4, 0, 0};
 
bool lcdReady = false;
 
void setup() {
  lcdReady = IclcdBegin(0x27, 20, 4);  // Set the LCD address and display size.
  if (lcdReady) {
    IclcdCreateChar(0, heart);  // Store custom character 0.
    IclcdWrite(0);  // Write one character to the LCD.
  }
}
 
void loop() {}

Precautions

Built-in Commands in the Same Category

← Built-in Command List