User Tools

Site Tools


en-us_commands:reference:iclcdprint

This is an old revision of the document!


IclcdPrint()

IclcdPrint() prints a string or number on the LCD.

IclcdPrint command operation flow

bool IclcdPrint(const char value[], uint8_t device = 0)
bool IclcdPrint(const String& value, uint8_t device = 0)
bool IclcdPrint(const __FlashStringHelper* value, uint8_t device = 0)
bool IclcdPrint(char value, uint8_t device = 0)
bool IclcdPrint(unsigned char value, int base = DEC, uint8_t device = 0)
bool IclcdPrint(int value, int base = DEC, uint8_t device = 0)
bool IclcdPrint(unsigned int value, int base = DEC, uint8_t device = 0)
bool IclcdPrint(long value, int base = DEC, uint8_t device = 0)
bool IclcdPrint(unsigned long value, int base = DEC, uint8_t device = 0)
bool IclcdPrint(double value, int digits = 2, uint8_t device = 0)

Commands

Command Arguments Return Value Operation
IclcdPrint(value, device) const char value[]
uint8_t device = 0
bool Prints a string or number on the LCD.

Example

void setup() {
  bool lcd1 = IclcdBegin(0x27, 20, 4, true, 0);
  bool lcd2 = IclcdBegin(0x26, 16, 2, true, 1);
 
  if (lcd1) IclcdPrint("MAIN", 0);
  if (lcd2) IclcdPrint("SUB", 1);
}
 
void loop() {
}

Precautions

  • PCF8574 connections use the same mapping as the existing CLCD library: P0=RS, P1=R/W, P2=Enable, P3=backlight, P4~P7=LCD D4~D7.
  • Verify the LCD module's actual I²C address using its settings and I²C scan results.
  • SDA/SCL can share the bus with other I²C devices, but addresses must not overlap.
  • Do not run Wire transfers or I²C slave callbacks concurrently with Iclcd…(). Iclcd transfers run at 100 kHz and then restore the previous TWI settings.
  • On MPAINO, using D20/D21 for external interrupts prevents simultaneous I²C use.
  • IclcdCommand() can change the LCD state directly. Use it only if you understand HD44780 commands.

← Built-in Command List

en-us_commands/reference/iclcdprint.1788785566.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki