From fff9e17f1ba3f93496ed80a201e87a3315e1c4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Tue, 14 Jul 2015 11:07:33 +0200 Subject: [PATCH] adjust to 50+1 LED instead of 60+1 since VLC does not support more than 16 per side (now using 16 on top/bottom, 9 on sides) --- firmware/main.c | 2 +- test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index 41f99ed..9359f74 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -31,7 +31,7 @@ #include "ws2812b.h" // to control WS2812B LEDs /* global variables */ -const uint8_t leds_per_channel[WS2812B_NB_CHANNELS] = {11,8,11,11,8,11}; // the led strips (top 1, top 2, left, bottom 1, bottom 2, right) +const uint8_t leds_per_channel[WS2812B_NB_CHANNELS] = {11,5,9,11,5,9}; // the led strips (top 1, top 2, left, bottom 1, bottom 2, right) uint8_t nb_leds = 0; // the total number of LEDs (will be calculated on the number of LEDs per channel) volatile uint8_t uart_in[16]; // input from USART, enough space for one fnordlight command or sync sequence diff --git a/test.rb b/test.rb index 357cac4..9267186 100755 --- a/test.rb +++ b/test.rb @@ -33,7 +33,7 @@ end # test all LEDs with red puts "cycle LEDs" -60.times do |i| +50.times do |i| atmolight.write [i,0x01,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00].pack("C*") # set LED to red atmolight.flush_output atmolight.write [0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00].pack("C*") # flush @@ -51,7 +51,7 @@ sleep 0.5 white = 0 while true do start = Time.now - 61.times do |i| + 51.times do |i| atmolight.write [i,0x01,0x00,0x00,white,white,white,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00].pack("C*") # set LED to red atmolight.flush_output end