newbie here..... received my neopixel strip a few days ago and iv been playing with code to try n create a particular sketch but can't find anything existing that will accomplish what I'm looking for. I'v been trying to learn the language and modify existing code but its not going well.... wondering if someone could possibly point me in the right direction? have something that sounds like it will work for me? heres the basic idea. i will be cutting the 1meter/60led strip into 6 pieces (10 lights per piece) and i want to install them around the jets inside my hot tub. i want to have each group of 10 lights act as a stand alone unit so that a colorswipe for instance would just involve the 10 leds around the jet. hope this makes sense..... any ideas? was thinking maybe i just get a library for a neopixel ring? would that work?

The Adafruit neopixel library that I have has examples included with it. Which library have you got ?


thats the one i have.... have only 3 examples within it. none of them show me how to do anything like what i want:(

You need to either make multiple strings of neopixels, each going to it's own pin, and update them totally independently, or make all one long strip (daisy chained) and have your animation code only modify one group of LEDs at a time (by modifying only that part of the array).

If you want to control each strip of 10 from a different Arduino pin you can modify the “strandtest” example.

You will create three strip objects instead of one:

#define PIN1 6
#define PIN2 7
#define PIN3 8

Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(60, PIN1, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(60, PIN2, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip3 = Adafruit_NeoPixel(60, PIN3, NEO_GRB + NEO_KHZ800);

Add to the setup() code to call the functions for each strip:

  strip1.show(); // Initialize all pixels to 'off'
  strip2.show(); // Initialize all pixels to 'off'
  strip3.show(); // Initialize all pixels to 'off'

As the code is written each effect function, like colorWipe, acts on the global strip object. Change each function so that you can pass in the object to use:

void colorWipe(Adafruit_NeoPixel strip, uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, c);

Now all you need to do is call the functions with the particular strip that you want to change:

  colorWipe(strip1,strip1.Color(255, 0, 0), 50); // Red
  colorWipe(strip2,strip2.Color(0, 255, 0), 50); // Green
  colorWipe(strip3,strip3.Color(0, 0, 255), 50); // Blue