Neopixel-Unable to update more than 8 individual sk6812 rgbw LED Strips

I'm doing a personal project for lighting up boxes in my wall, and I have an Arduino Nano as the controller and I initialize 9 different strips in the code:

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN1     2
#define LED_PIN2     3
#define LED_PIN3     14
#define LED_PIN4     15
#define LED_PIN5     6
#define LED_PIN6     7
#define LED_PIN7     8
#define LED_PIN8     9
#define LED_PIN9     16
uint8_t index = 0;
uint8_t index2 = 0;
uint8_t index3 = 0;
// How many NeoPixels are attached to the Arduino?
#define LED_COUNT1  21
#define LED_COUNT2  25
#define LED_COUNT3  70
#define LED_COUNT4  95
#define LED_COUNT5  25
#define LED_COUNT6  30
#define LED_COUNT7  75
#define LED_COUNT8  25
#define LED_COUNT9  70

// NeoPixel brightness, 0 (min) to 255 (max)
#define BRIGHTNESS 100 // Set BRIGHTNESS to about 1/5 (max = 255)
  Adafruit_NeoPixel strip9(LED_COUNT9, LED_PIN9, NEO_GRBW + NEO_KHZ800);
  Adafruit_NeoPixel strip1(LED_COUNT1, LED_PIN1, NEO_GRBW + NEO_KHZ800);
  Adafruit_NeoPixel strip2(LED_COUNT2, LED_PIN2, NEO_GRBW + NEO_KHZ800);
  Adafruit_NeoPixel strip3(LED_COUNT3, LED_PIN3, NEO_GRBW + NEO_KHZ800);
  Adafruit_NeoPixel strip4(LED_COUNT4, LED_PIN4, NEO_GRBW + NEO_KHZ800);
  Adafruit_NeoPixel strip5(LED_COUNT5, LED_PIN5, NEO_GRBW + NEO_KHZ800);
  Adafruit_NeoPixel strip6(LED_COUNT6, LED_PIN6, NEO_GRBW + NEO_KHZ800);
  Adafruit_NeoPixel strip7(LED_COUNT7, LED_PIN7, NEO_GRBW + NEO_KHZ800);
  Adafruit_NeoPixel strip8(LED_COUNT8, LED_PIN8, NEO_GRBW + NEO_KHZ800);

void setup() {
  

  strip9.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip9.show();            // Turn OFF all pixels ASAP

  strip1.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip1.show();            // Turn OFF all pixels ASAP

  strip2.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip2.show();            // Turn OFF all pixels ASAP

  strip3.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip3.show();            // Turn OFF all pixels ASAP

  strip4.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip4.show();            // Turn OFF all pixels ASAP

  strip5.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip5.show();            // Turn OFF all pixels ASAP

  strip6.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip6.show();            // Turn OFF all pixels ASAP

  strip7.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip7.show();            // Turn OFF all pixels ASAP

  strip8.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip8.show();            // Turn OFF all pixels ASAP

  
}

void loop() {
  strip9.fill(strip9.Color(index, index2, index3, strip9.gamma8(255)));
  strip1.fill(strip1.Color(index, index2, index3, strip1.gamma8(255)));
  strip2.fill(strip2.Color(index, index2, index3, strip2.gamma8(255)));
  strip3.fill(strip3.Color(index, index2, index3, strip3.gamma8(255)));
  strip4.fill(strip4.Color(index, index2, index3, strip4.gamma8(255)));
  strip5.fill(strip5.Color(index, index2, index3, strip5.gamma8(255)));
  strip6.fill(strip6.Color(index, index2, index3, strip6.gamma8(255)));
  strip7.fill(strip7.Color(index, index2, index3, strip7.gamma8(255)));
  strip8.fill(strip8.Color(index, index2, index3, strip8.gamma8(255)));
  
  showStrips();
  if (index < 255) {
  index++;
  }
  else if (index2 < 255) {
    index2++;
  }
  else if (index3 < 255) {
    index3++;
  }
  else {
    index++;
    index2++;
    index3++;
  }
  delay(1);
}

void showStrips() {
  strip1.show();  
  strip2.show();
  strip3.show();
  strip4.show();
  strip5.show();
  strip6.show();
  strip7.show();
  strip8.show();
  strip9.show();
}

Each of the strips works individually, but the last strip, in this case strip8, does not change and remains the same color as when it is first initialized. Anyone have any advice on how to fix this issue?

Have you tried different pins on "strip8"? Trying to see if it is hardware or software.

I have tried that, if i rearrange the order in which the color is set, its always the one at the very bottom that doesn't work properly. Hence why strip9 is called before all others in my code

Most likely you are running out of memory.
There are a total of 436 LEDs, which need four bytes of memory each since they are GRBW, for a total of 1744 bytes. The compiler shows only 1828 bytes free.

Are you intending to do anything other than have all the LEDs the same color?

probably going to add some effects later, does that mean that I need to use a higher power board such as a mega?

Depends on what effects you want to achieve, Mega or any board with a bit more ram would work.

Alternatively, the Adafruit_Neopixel library has a setPin() function that allows you to change the pin the strip is connected to. That would allow you to use a single buffer large enough for the longest strip (95 LEDs), but would limit the effects you could use.

Did you try to connect strip8 in serie to strip7 to the same pin , so you would use 8 strips, but with the same number of leds as with 9 strips before?
This would allow us to understand whether the problem is in the number of strips or in memory.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.