uledd: add a tiny ubus frontend for PWM/RGB leds

This daemon allows users to control PWM driven RGB LEDs using ubus.
Currently it is possible to make leds blink at different brightnesses
and or make them fade in between colours.

the following call will turn green on and red off:
ubus call led set '{ "leds": { "ap:green:status": 255, "ap:red:status": 0 } }'

the following call will make green and red fade on/off over 2 seconds:
ubus call led set '{ "leds": { "ap:green:status": [0, 255], "ap:red:status": [255, 0] }, "on": 2000, "off": 2000, "fade": 1 }'

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2017-10-19 14:46:06 +02:00
parent 9b9ef2375d
commit 282432de33
2 changed files with 45 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh /etc/rc.common
START=95
USE_PROCD=1
PROG=/sbin/uledd
start_service() {
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance
}