Neopixel strip - setting pixel color

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
tidge27
 
Posts: 2
Joined: Tue Nov 26, 2013 2:27 pm

Neopixel strip - setting pixel color

Post by tidge27 »

Hi,

I have invested in a meter of the 144led/m neopixel strip, which I intend to use for high res light paining. In order to control the system, I would like to have a pi controlling an external arduino. One thing that would make this much easier, would be if I could understand the usage of...

Code: Select all

strip.setPixelColor(n, color);

I can see this on the 'Uberguide' however I do not know how to calculate these values myself. - Ideally I would do this on the Pi, which would be much more convenient than sending the values of R, G, and B for each pixel!

Thanks,
Tom

1chicagodave
 
Posts: 564
Joined: Wed Jun 19, 2013 3:35 am

Re: Neopixel strip - setting pixel color

Post by 1chicagodave »

it's very similar to the top row of this
http://drpeterjones.com/colorcalc/

enter 3 numbers from 0-255 in top-right box, hit 'calculate', a single 6 digit hex # (representing color) will appear in top-left box.

*EDIT - Or this one is little more visual & interactive -
http://www.calculatorcat.com/free_calcu ... ider.phtml

tidge27
 
Posts: 2
Joined: Tue Nov 26, 2013 2:27 pm

Re: Neopixel strip - setting pixel color

Post by tidge27 »

Awesome... Thanks for the reply. I have just had the time to test this and it works perfectly, even with the HEX colour code as a base 10 integer. :D

Thanks,
Tom

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

Return to “Other Arduino products from Adafruit”