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:
parent
a643f5b158
commit
fff9e17f1b
|
@ -31,7 +31,7 @@
|
||||||
#include "ws2812b.h" // to control WS2812B LEDs
|
#include "ws2812b.h" // to control WS2812B LEDs
|
||||||
|
|
||||||
/* global variables */
|
/* 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)
|
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
|
volatile uint8_t uart_in[16]; // input from USART, enough space for one fnordlight command or sync sequence
|
||||||
|
|
||||||
|
|
4
test.rb
4
test.rb
|
@ -33,7 +33,7 @@ end
|
||||||
|
|
||||||
# test all LEDs with red
|
# test all LEDs with red
|
||||||
puts "cycle LEDs"
|
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.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.flush_output
|
||||||
atmolight.write [0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00].pack("C*") # flush
|
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
|
white = 0
|
||||||
while true do
|
while true do
|
||||||
start = Time.now
|
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.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
|
atmolight.flush_output
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue