NeoPixel programming help

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
michaelm19
 
Posts: 2
Joined: Thu Nov 28, 2013 3:08 pm

NeoPixel programming help

Post by michaelm19 »

Is it possible to program individual pixels to run with other pixels doing different things at the same time? I would like to clump some pixels together (about 4 pixels) and have them fade in and out randomly green and have other clumps (50 pixels) fade randomly another color and also another clump (100) be solid or sparkling? I would like to isolate several sections of the strip and give them their own pattern. I haven't seen any type of coding like this and I have tried looking everywhere. Not sure if its even possible, or I am not seeing it in front of my face. I am total newb at programming but picking it up quick! I'm working on this project, and hoping to make it spectacular!
setup: -NeoPixel (4 meters ,60 pixel per Meter) -Uno board

Sorry if the question is confusing...but please help!

Thanks!

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: NeoPixel programming help

Post by adafruit_support_bill »

This tutorial should get you started in the right direction. It picks random pairs of leds and has them fading in and out. Multiple pairs can be active simultaneously and each acts independently. You could modify it to work on different size groups of pixels and create different variants of the "blinker" class with different behaviors (e.g. solid or sparkling).

http://learn.adafruit.com/random-spooky-led-eyes

Note, this tutorial uses the WS2801 pixels, but aside from the strip declaration, the code for neopixels is pretty much the same.

User avatar
michaelm19
 
Posts: 2
Joined: Thu Nov 28, 2013 3:08 pm

Re: NeoPixel programming help

Post by michaelm19 »

Thanks Bill!

I have tried playing with the Blinking eyes code and what I thought I knew went out the door.. I would like to have Pixels 0-50 be blue fade in and out slowly at random intervals between each pixels and possible have white turn up when some blue fades. (like underwater reflections). Then for Pixels (51-53) and (54-56) alternate shades/intensity of green (like two sides of seaweed). and the rest of the strip would continue this pattern until a determined section of pixels either blend solid colors or/twinkle (make a word stand out). So by now you can see this is going to be a sea themed sign. The Strip will be snaked between two boards to light up isolated sections. One side of the board will have cut outs displaying the Leds through parchment paper. Is the blinking eyes code still useful here?

Anybody out there good at coding? this might be a fun challenge I think. its different than making rainbow wheels and cylon eyes. :lol:

Thanks to anyone in advance if you would like to help me! Anything would be appreciated.

User avatar
adafruit_support_bill
 
Posts: 88086
Joined: Sat Feb 07, 2009 10:11 am

Re: NeoPixel programming help

Post by adafruit_support_bill »

The best way to approach it is to 'divide and conquer'. Start with the 'blinker' class and modify it to fade one led (instead of two) in shades of blue and white (instead of red/orange/yellow).

Once you have that. You can create an array of 50 of them and let them do their thing.

Then you can create a variant of blinker that does the seaweed thing and add those to your array.

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

Return to “General Project help”