목차

IclcdCreateChar()

IclcdCreateChar()는 사용자 정의 문자를 등록합니다.

IclcdCreateChar 명령어 동작 흐름

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

명령어

명령어 인수 반환값 동작
IclcdCreateChar(location, charmap, device) uint8_t location
const uint8_t charmap[8]
uint8_t device = 0
bool 사용자 정의 문자를 등록합니다.

예제

MPAINO-8A8R(T)의 I2C 포트에 주소 0x27인 20×4 PCF8574 문자 LCD를 연결한 예제입니다. 실제 LCD의 주소나 크기가 다르면 IclcdBegin() 인수를 바꾸십시오.

const uint8_t heart[8] = {0, 10, 31, 31, 14, 4, 0, 0};
 
bool lcdReady = false;
 
void setup() {
  lcdReady = IclcdBegin(0x27, 20, 4);  // LCD 주소와 화면 크기를 설정합니다.
  if (lcdReady) {
    IclcdCreateChar(0, heart);  // 사용자 문자 0번을 등록합니다.
    IclcdWrite(0);  // LCD에 한 글자를 씁니다.
  }
}
 
void loop() {}

주의사항

같은 카테고리의 내장 명령어

← 내장 명령어 리스트