so I'm making a new set of stair lights,

gplus
(Kelvin Mead) #1

so I’m making a new set of stair lights, but this set has 2 leds per step, one on either side of the step.

i currently have an array [0 - 13] going up the left side of the stairs, and then [26-14] coming down the right hand side.

everytime i do an array, i get a tiny delay between the 2 sides… left > right.

how do i get them to be identical?

i never need the left and right to be different… is there a way of hardcoding it / fixing by hardware… so, led [0] is both sides of the step?

(Kelvin Mead) #2

:: oOoOo My GOD!! ::… arduino 1.6.6, arduino pro nano copy (ch340), ws2812 (install) and ada106 (testing).
mac, el capitan,

not sure on the version of fastled, but it has

  • (The moon) dithering support
  • Teensy 3.1 support
    in the update list.
(Andrew Tuline) #3

Well, you could experiment with tying both data pins together, however, you’d want to put a 220 ohm resistor between the Arduino and each of the LED data input pins to be safe. Personally, I like the flexibility to allow them to be programmed separately.

Otherwise, you might want to pastebin the code for review.

(John Oatham) #4

There’s a document in the FastLED wiki, Multiple Controller Examples, and in there a section called Mirroring Strips - if you wired up each side of the stairs to a separate data pin and followed that example I think it would do what you want, with the flexibility of making them different at a later date if you wanted to.

(Kelvin Mead) #5

i think thats what I’m going to do… I’m having so many issues trying to do simple things…

(Kelvin Mead) #6

apparently, nested for loops are bad… can someone point me in the right direction for the simplest of ways to light some leds.

15 leds, to fade in, individually.

my code is

for (int i=0; i < 14; i++) {
for (int fade = 0; fade < 255; fade++) {
leds[i] = CHSV( huev, sat, fade);
FastLED.show();
}
delay(stairlightuptime);
}

my perfect world would be no nested for loops, and not having to use a delay to control the speed.