control of monochrome LEDstrips.

control of monochrome LEDstrips.
I have two related questions:
I have used LPD8086 strips with white LEDs for some time using the FastLED library without any problem, but I am curious if there is a possibillity of code optimization. I work with quite long stretches of strips and wonder if there is a way of creating code with single-channel LED arrays instead of RGB arrays to use less RAM per LED, and thus being able to control longer stretches of strips from one controller? I thought I had read something about that a long time ago on the forum but haven´t been able to track it down.

Second question is related to a different type of white LEDstrip I recently bought, a WS2811 strip where the controllers are external, not integrated with the LEDS. When I try to control this with FastLED WS2811 everytime I turn on 1 led in software 3 light up on the strip. However when creating movement they move 1 LED at a time, so it´s not a case where one chip is controlling 3 LEDs at the same time. So I was thinking this could also be related to a RGB-singlecolor issue?

hc

(Edit: Argh, reading comprehension!)

What I’d imagine is going on there with your WS2811 white led strips is that each R/G/B channel is connected to a separate white LED. So instead of saying:

leds[0] = CRGB::White;
leds[1] = CRGB::White;
leds[2] = CRGB::White;

… try doing something like:

leds[0] = CRGB::Red;
leds[0] = CRGB::Green;
leds[0] = CRGB::Blue;

… to get the white LEDs to light in sequence.

If you want to save RAM can you not just set the color inside a loop rather than moving it out of memory? Several of the examples generate the colors procedurally rather than storing the colors as I recall.

I am assuming when I declare something like this: CRGB leds[NUM_LEDS]; I am already assigning space in RAM for RGB values when I only need one value?

@hc_gilje where can you get addressable white LEDs other than Adafruit? I am very interested. Cheers

@hc_gilje Each WS2811 chip is connected to three LEDs. In a “normal” RGB LED configuration, those three LEDs are the R, G and B sub-LEDs in a single 5050 package. In this white LED strip of yours, those three LEDs are the three individual white ones. So imagine that instead of your CRGB struct having an 0-255 value for r, g and b, it has an 0-255 value for w1, w2 and w3.

Is this making sense?

thanks, Robert, I will try that out, it makes sense.

@Matt_Richard
I use http://gree-leds.com, they have a wide selection of different strips.

@Robert_Atkins
You were right, I am able to control each LED by sending R, G and B values separately. This was information the producer of the strip didn´t know about.
So one of two problems solved!

I’d be surprised if the LPD8806 strips were any different—except the LPD8806 has two RGB channels (https://solarbotics.com/download.php?file=1889). So I think you’ll either find each driver chip hooked up to six discrete white LEDs or that the two white LEDs connected to each chip are actually 5050s containing three individual white sub-LEDs—effectively giving you about 9.5 bits of brightness per pixel.

@Daniel_Garcia and @Mark_Kriegsman have floated the idea of supporting multiple bit depths in the context of 32 bit RGBW strips, but I wouldn’t hold my breath for arbitrary bit depth support. If you’re running out of RAM for the number of pixels you need, the simplest answer is to use a beefier microcontroller.

@Robert_Atkins
I think maybe you misunderstood my LPD8806 question. As you suggested, each chip controls two 5050 LEDs and work as a normal RGB strip except all being white. They work as expected, so if I declare an array like CRGB leds[NUM_LEDS]; and send CRGB::White to one LEDaddress it turns on an individual LED to full, any other value just gives less brightness to the LED. So I am just wondering if it would be possible to use a one-dimensional array instead since I am always using the same values for the RGB channels, assuming then that the array would consume a third of the RAM. But this probably just complicates things. I am already managing substantial lengths from a teensy 3.0.

Yeah, and I’m saying that as the LPD8806 has six output channels driving two LEDs, each LED probably has three sub-LEDs on a channel each.

@Robert_Atkins
that´s correct, I was just trying to point out that my LPD8806 question was library-related, so apologies for any confusion, I should have created one thread for each question.

Re using a 1 byte array instead of the three byte rgb array, the short answer is no. Everything in the internals of the library is expecting an array of rgb values.

ok, thanks for the quick answer!