# Light : Relay
Implements Light
Switches a lamp wired to a relay of a Voldeno module. On/off only, so set the features of the light block to On/Off.
Light : Relay
# Source Code
View Volang source
// Light : Relay - implementation of the light block.
//
// Switches a lamp wired to a relay of a Voldeno module. The relay only knows
// on and off, so brightness and color are ignored, and there is no feedback:
// the light block publishes the state it commanded.
extern fn light_apply(power, brightness, color_mode, color_temp, hue, saturation) {
if (power) {
register::set(1)
} else {
register::set(0)
}
return 0
}