NeoPixel 16 LED ring help

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Obyah
 
Posts: 7
Joined: Sun Sep 14, 2014 1:00 am

NeoPixel 16 LED ring help

Post by Obyah »

Greetings everyone. I'm having an issue with the above item. It seems to be working great but I'm having a problem with getting red to show up when I try to place that particular color parameter into a variable e.g.

if I just do strip.setPixelColor(0, strip.Color(255, 0, 0);
Then red shows up just fine as well as green and blue

However, if I do int pxlColor = strip.Color(255, 0, 0); and then strip.setPixelColor(0, pxlColor);
Then red does not show up at all for any of the LED's but it works perfectly fine for both green and blue!

The sketch examples provided also work great and each individual led seem to be functioning properly including displaying red.

Just don't know what else to try. I'm using the Arduino IDE 1.6.4 if that makes any difference.

Thanks for any help
Last edited by Obyah on Wed Jun 17, 2015 12:51 am, edited 1 time in total.

User avatar
Disciple
 
Posts: 852
Joined: Tue Jan 06, 2015 8:13 pm

Re: NeoPixel 16 LED ring help

Post by Disciple »

Obyah wrote:However, if do int pxlColor = strip.Color(255, 0, 0); and then strip.setPixelColor(0, pxlColor);
Then red does not show up at all for any of the LED's but it works perfectly fine for both green and blue!
I think a 32-bit variable is needed there. Try substituting this.
uint32_t pxlColor = strip.Color(255, 0, 0);

Hallelujah!
Disciple

User avatar
Obyah
 
Posts: 7
Joined: Sun Sep 14, 2014 1:00 am

Re: NeoPixel 16 LED ring help

Post by Obyah »

Hallelujah!

That did the job! Thank you so much Disciple!

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”