Individual Led on LED Strip. Can it be done?

Thread Starter

Link068

Joined Apr 10, 2017
31
Question regarding LED strips that have a data line or controllable RGBW led strips.

I've attached a rough diagram on the basic idea but can you control individual leds on a led strip and hold that colour?

Eg can you have one blue,green and white and adjust brightness with PWM?

link_image1 (3)_corr.jpeg

Cheers

Moderators note : rotated image and corrected whiebalance, shown image full size
 

Attachments

Last edited by a moderator:

danadak

Joined Mar 10, 2018
4,057
If the strip has addressable controllers in it for each RGB LED.

Or are you trying to control all Red in a strip together, same for G and B color
LEDs ?

Regards, Dana.
 

DNA Robotics

Joined Jun 13, 2014
649
Thanks ebeowulf17 This is what I gleaned from that link.

Individually addressable LEDs
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-neopixel-uberguide.pdf

to set the color of a pixel.

strip.setPixelColor(n, red, green, blue);

The first argument — n in this example — is the pixel number along the strip, starting from 0 closest to the Arduino. If you have a strip of 30 pixels, they’re numbered 0 through 29. It’s a computer thing. You’ll see various places in the code using a for loop, passing the loop counter variable as the pixel number to this function, to set the values of multiple pixels. The next three arguments are the pixel color, expressed as red, green and blue brightness levels, where 0 is dimmest (off) and 255 is maximum brightness.

To set the 12th pixel (#11, counting from 0) to magenta (red + blue), you could write:

strip.setPixelColor(11, 255, 0, 255);

Adafruit NeoPixel Digital RGB LED Strip - Black 30 LED - BLACK
PRODUCT ID: 1460
https://www.adafruit.com/product/1460?length=1
$16.95 per meter

Flora RGB Smart NeoPixel version 2 - Pack of 4
PRODUCT ID: 1260 $7.95
https://www.adafruit.com/product/1260

The pixels are chainable - so you only need 1 pin/wire to control as many LEDs as you like.
These pixels have full 24-bit color ability with PWM taken care of by the controller chip.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thanks ebeowulf17 This is what I gleaned from that link.

Individually addressable LEDs
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-neopixel-uberguide.pdf

to set the color of a pixel.

strip.setPixelColor(n, red, green, blue);

The first argument — n in this example — is the pixel number along the strip, starting from 0 closest to the Arduino. If you have a strip of 30 pixels, they’re numbered 0 through 29. It’s a computer thing. You’ll see various places in the code using a for loop, passing the loop counter variable as the pixel number to this function, to set the values of multiple pixels. The next three arguments are the pixel color, expressed as red, green and blue brightness levels, where 0 is dimmest (off) and 255 is maximum brightness.

To set the 12th pixel (#11, counting from 0) to magenta (red + blue), you could write:

strip.setPixelColor(11, 255, 0, 255);

Adafruit NeoPixel Digital RGB LED Strip - Black 30 LED - BLACK
PRODUCT ID: 1460
https://www.adafruit.com/product/1460?length=1
$16.95 per meter

Flora RGB Smart NeoPixel version 2 - Pack of 4
PRODUCT ID: 1260 $7.95
https://www.adafruit.com/product/1260

The pixels are chainable - so you only need 1 pin/wire to control as many LEDs as you like.
These pixels have full 24-bit color ability with PWM taken care of by the controller chip.
Yes, those are the basic ideas.

It's worth noting that the code you shared assumes that you are using an Arduino (or one of the countless comparable systems that can also be programmed using the Arduino IDE) and that you've downloaded and installed the Adafruit Neopixel library. If you don't use that library (or comparable libraries from other sources,) then you have to do more in depth programming to manage memory and communication. The Adafruit library uses around 3 bytes of microcontroller RAM per Neopixel, so if you want to use a lot of them, you need to check how that impacts your available RAM.

I've used different Neopixel packages a couple times, along with the Adafruit library, with good results, but I know many of the more experienced programmers here cringe when they see Arduino libraries consuming resources and hiding lower level commands, methods, and data.
 

Thread Starter

Link068

Joined Apr 10, 2017
31
If the strip has addressable controllers in it for each RGB LED.

Or are you trying to control all Red in a strip together, same for G and B color
LEDs ?

Regards, Dana.
Hi Dana,

wanting to control sections of an LED strip...if that makes sense.

So if 9 total on a strip, then 3 red, 3 blue, 3 green.


cheers
 
Top