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)

This commit is contained in:
King Kévin 2015-07-14 11:07:33 +02:00
parent a643f5b158
commit fff9e17f1b
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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