0

NeoPixel ring lights up 2 LEDs when only 1 is coded to be on
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

NeoPixel ring lights up 2 LEDs when only 1 is coded to be on

by MuffinThePancake on Tue Apr 27, 2021 11:29 pm

I am trying to light up the 3rd LED on my NeoPixel ring but several of them light up 2 at a time when only one is told to turn on.
i was using a counter to increment through the lights but many of them light up 2 at a time.

Code:
void rainbowCustom(){
strip.setPixelColor(2, 50, 50, 50);
strip.show();
delay(1000);
}
Attachments
20210427_201823.jpg
20210427_201823.jpg (62.75 KiB) Viewed 84 times

MuffinThePancake
 
Posts: 2
Joined: Tue Apr 27, 2021 10:22 pm

Re: NeoPixel ring lights up 2 LEDs when only 1 is coded to b

by adafruit_support_mike on Tue Apr 27, 2021 11:58 pm

You're using code for an RGBW NeoPixel. Make sure your NeoPixel ring has RGBW pixels and not just RGB ones.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: NeoPixel ring lights up 2 LEDs when only 1 is coded to b

by MuffinThePancake on Wed Apr 28, 2021 10:03 pm

My understanding from the library use on the adafruit website was that i was using the RGB code.

My code: strip.setPixelColor(2, 50, 50, 50);
RGB example: strip.setPixelColor(n, red, green, blue);
RGBW example: strip.setPixelColor(n, red, green, blue, white);

When I use the RGBW example it always lights up 2 at a time and one is always white even though only one is coded to light up.

MuffinThePancake
 
Posts: 2
Joined: Tue Apr 27, 2021 10:22 pm

Re: NeoPixel ring lights up 2 LEDs when only 1 is coded to b

by adafruit_support_mike on Sat May 01, 2021 2:57 am

Hang on.. mental lapse on my part: .setPixelColor() takes the pixel number and the RGB components. The RGBW call would have five arguments.

What happens on the ring if you change the pixel number? Does the first pixel still glow blue, or does that behavior move with the pixel that's supposed to be lit?

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.