Led

Led

A small light that can change colors.

Properties

State boolean

LED on/off state.

Color color

LED color.

Examples

A small piece of code for a color-changing LED:

-- turn the LED on once at startup
gdt.Led0.State = true

-- store a value for hue
local hue = 0

function update()
	-- set LED color with hue
	gdt.Led0.Color = ColorHSV(hue, 100, 100)
	
	-- increase hue and wrap back to 0 once it reaches 360
	hue = (hue + 1) % 360
end