diff options
Diffstat (limited to 'led_clear.c')
-rw-r--r-- | led_clear.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/led_clear.c b/led_clear.c new file mode 100644 index 0000000..f723f2e --- /dev/null +++ b/led_clear.c @@ -0,0 +1,19 @@ +#include <ws2811/ws2811.h> +#include <stdio.h> + +#include "led_info.h" + +int main() { + printf("Clearing LED lights...\n"); + ws2811_return_t ret; + if ((ret = ws2811_init(&ledstring)) != WS2811_SUCCESS) { + printf("Error initilizing ws8211 strip: %s\n", ws2811_get_return_t_str(ret)); + return 1; + } + for(int i = 0; i < LED_COUNT; i++) { + ledstring.channel[0].leds[i] = 0; + } + ws2811_render(&ledstring); + ws2811_fini(&ledstring); + return 0; +} |