LcdDisplay

LcdDisplay

The LcdDisplay is an alphanumerical display consisting of 2 lines, 16 characters per line. It cannot display graphics and doesn't need a VideoChip to work.

Note: Unlike the other modules, the LcdDisplay does not follow its class' name for its objects, using Lcd instead, like so:

gdt.Lcd0

Properties

Text string

The text to be visualized on the LCD. To display text on the second line, your string must be formatted starting from the 17th character and beyond.

BgColor color

Background color for the LCD.

TextColor color

Foreground color for the LCD's text.

Examples

A small piece of code to change the LCD Display background color, displaying the hue value in text:

-- store a value for hue
local hue = 0

function update()
	-- put the hue value converted to text on display
	gdt.Lcd0.Text = "Hue: " .. tostring(hue)
	
	-- change display background color with hue
	gdt.Lcd0.BgColor = ColorHSV(hue, 100, 75)
	
	-- increase hue and wrap back to 0 once it reaches 360
	hue = (hue + 1) % 360
end