Henglos IO
Built-in packages

LCD

Shows text on a 16x2 (or 20x4) HD44780 character LCD — through an I2C backpack (the common "I2C LCD" module, 4 pins), or wired straight to the board in 4-bit parallel mode (6 pins) when there's no I2C.

Shows text on a 16x2 (or 20x4) HD44780 character LCD — through an I2C backpack (the common "I2C LCD" module, 4 pins), or wired straight to the board in 4-bit parallel mode (6 pins) when there's no I2C. Print writes text or a bound value on a line, Clear blanks it, Backlight turns the light on or off. Every action on the same wiring drives the same display.

@henglosio/component-lcdv1.0.0platform ^1.0.0
NodeKindWhat it does
PrintActionWrites text — or a bound value, like a sensor's reading — on a line of the display.
ClearActionBlanks the whole display, or one line of it.
BacklightActionTurns the backlight on or off — what's on the display stays.

Actions

Print

Writes text — or a bound value, like a sensor's reading — on a line of the display.

Settings

SettingTypeDefaultWhat it's for
ConnectionOne of: I2C backpack, Parallel (4-bit)I2C backpackHow the display is wired — an I2C backpack (4 pins), or straight to the board (6 pins, no I2C needed).
SDA PinPin (digital out)GPIO21Shown when Connection is I2C backpack. Board pin wired to the backpack's SDA.
SCL PinPin (digital out)GPIO22Shown when Connection is I2C backpack. Board pin wired to the backpack's SCL.
RS PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's RS (pin 4).
E PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's E (pin 6). RW (pin 5) goes to GND.
D4 PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's D4 (pin 11).
D5 PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's D5 (pin 12).
D6 PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's D6 (pin 13).
D7 PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's D7 (pin 14).
TextTextHello, world!What to show — type it, or bind an output or a variable (numbers are formatted, see Decimals). A typed \n goes on to the next line. Accents show as their plain letter (no glyphs for them on the LCD).
LineOne of: Line 1, Line 2, Line 3, Line 4Line 1Which line to write on (3 and 4 only on a 20x4).
AlignOne of: Left, Center, RightLeftWhere on the line the text goes.
FormatText—Advanced. Text around Text — {} stands for it: "Temp: {} °C". Without {}, it goes before it.
ColumnNumber1Advanced. Shown when Align is Left. Which column the text starts at, from 1.
Clear LineOn / offOnAdvanced. Blank the rest of the line, so a shorter text doesn't leave the end of the last one behind.
DecimalsNumber2Advanced. Decimal places of a bound number that isn't whole (0–6).
AddressText0x27Advanced. Shown when Connection is I2C backpack. The backpack's I2C address — 0x27 on most, 0x3F on some (PCF8574A).
SizeOne of: 16x2, 20x416x2Advanced. The display's size, in characters.

Clear

Blanks the whole display, or one line of it.

Settings

SettingTypeDefaultWhat it's for
ConnectionOne of: I2C backpack, Parallel (4-bit)I2C backpackHow the display is wired — an I2C backpack (4 pins), or straight to the board (6 pins, no I2C needed).
SDA PinPin (digital out)GPIO21Shown when Connection is I2C backpack. Board pin wired to the backpack's SDA.
SCL PinPin (digital out)GPIO22Shown when Connection is I2C backpack. Board pin wired to the backpack's SCL.
RS PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's RS (pin 4).
E PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's E (pin 6). RW (pin 5) goes to GND.
D4 PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's D4 (pin 11).
D5 PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's D5 (pin 12).
D6 PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's D6 (pin 13).
D7 PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin wired to the display's D7 (pin 14).
LineOne of: Whole display, Line 1, Line 2, Line 3, Line 4Whole displayWhat to blank.
AddressText0x27Advanced. Shown when Connection is I2C backpack. The backpack's I2C address — 0x27 on most, 0x3F on some (PCF8574A).
SizeOne of: 16x2, 20x416x2Advanced. The display's size, in characters.

Backlight

Turns the backlight on or off — what's on the display stays. On I2C the backpack switches it; in parallel, the board drives Backlight Pin.

Settings

SettingTypeDefaultWhat it's for
ConnectionOne of: I2C backpack, Parallel (4-bit)I2C backpackHow the display is wired — an I2C backpack (4 pins), or straight to the board (6 pins, no I2C needed).
SDA PinPin (digital out)GPIO21Shown when Connection is I2C backpack. Board pin wired to the backpack's SDA.
SCL PinPin (digital out)GPIO22Shown when Connection is I2C backpack. Board pin wired to the backpack's SCL.
Backlight PinPin (digital out)—Shown when Connection is Parallel (4-bit). Board pin driving the display's backlight (A, pin 15 — through a resistor, or a transistor for brighter modules). Parallel only.
OnOn / offOnLight on (or off).
AddressText0x27Advanced. Shown when Connection is I2C backpack. The backpack's I2C address — 0x27 on most, 0x3F on some (PCF8574A).
SizeOne of: 16x2, 20x416x2Advanced. The display's size, in characters.

On this page