URGENT!! Help with programming neopixel strip!!!

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
daniellejstephen
 
Posts: 20
Joined: Wed Apr 30, 2014 3:35 am

URGENT!! Help with programming neopixel strip!!!

Post by daniellejstephen »

Hi!! I'm very busy and running close to my deadline. I'm not very good at programming.
Can somebody please please pleeease, put together a code for me, or any kind of help!!! My strip light is the latest neopixel 60LED strip light 3m long.
I need the strip light to be WHITE and have a slow up and down movement down the strip

ANY HELP is GREATLY APPRECIATED!!!!!

User avatar
brucef
 
Posts: 215
Joined: Tue May 03, 2011 4:51 pm

Re: URGENT!! Help with programming neopixel strip!!!

Post by brucef »

Maybe what you're looking for is a Larson scanner?

To change the red to white in that code, you need to turn on the red green and blue subpixels, rather than just the red ones. E.g. change:

Code: Select all

  strip.setPixelColor(pos - 2, 0x100000); // Dark red
to:

Code: Select all

  strip.setPixelColor(pos - 2, 0x101010); // Dim white
The center one is a bit tricky if you don't understand the hex, so I'll give you that one too; 0xFFFFFF should do what you want.

daniellejstephen
 
Posts: 20
Joined: Wed Apr 30, 2014 3:35 am

Re: URGENT!! Help with programming neopixel strip!!!

Post by daniellejstephen »

Awesome!!! Thank you so much, it worked like a charm!!
Ok, how can I slow it down a little bit?

User avatar
brucef
 
Posts: 215
Joined: Tue May 03, 2011 4:51 pm

Re: URGENT!! Help with programming neopixel strip!!!

Post by brucef »

Glad it worked! As for speed, play with this line:

Code: Select all

delay(30);
That number is an approximate number of milliseconds, as documented in the Arduino reference.

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

Return to “Microcontrollers”