Pico fizzles out with more than 8 Neomatrix strips

Hi,

I am creating a big-scale project where I must hook up 10 neomatrix strips to a Raspberry Pi Pico.
I tried testing with a very small number of LEDS and still, the maximum number of strips it can take is 8.

Am I missing something here?

#include <Adafruit_NeoPixel.h>
#define NUM_LEDS 5

Adafruit_NeoPixel strips[] = {

  Adafruit_NeoPixel(NUM_LEDS, 6, NEO_GRB + NEO_KHZ800),
  Adafruit_NeoPixel(NUM_LEDS, 7, NEO_GRB + NEO_KHZ800),
  Adafruit_NeoPixel(NUM_LEDS, 8, NEO_GRB + NEO_KHZ800),
  Adafruit_NeoPixel(NUM_LEDS, 9, NEO_GRB + NEO_KHZ800),
  Adafruit_NeoPixel(NUM_LEDS, 10, NEO_GRB + NEO_KHZ800),
  Adafruit_NeoPixel(NUM_LEDS, 12, NEO_GRB + NEO_KHZ800),
  Adafruit_NeoPixel(NUM_LEDS, 13, NEO_GRB + NEO_KHZ800),
  Adafruit_NeoPixel(NUM_LEDS, 11, NEO_GRB + NEO_KHZ800),
  //Adafruit_NeoPixel(NUM_LEDS, 14, NEO_GRB + NEO_KHZ800),
  //Adafruit_NeoPixel(NUM_LEDS, 15, NEO_GRB + NEO_KHZ800),
};
#define NUMSTRIPS (sizeof(strips)/sizeof(strips[0]))

void setup() {

  for (int i = 0; i < NUMSTRIPS; i++) {
    strips[i].begin();
    strips[i].show();
  }
}

void loop(){ 
   Serial.println(sizeof(strips));
  Serial.println(sizeof(strips[0]));
  delay(1); 
}

This code works as intended with 8 strips. However, once I uncomment even one more, the Pi Pico locks up. I cannot figure out why this is happening, as the memory footprint does not exceed the 2MB that the Pi has. I even tried flooding the memory with more data (unrelated to the strips) and it worked.

Assistance on this issue is greatly appreciated.

First of all - Pico has 264Kb SRAM only. Those 2MB that you mention is a FLASH - a space to write programs and permanent data. That 2MB has nothing to do with how many neopixels you can run in a sketch.

However, 264k is more than enough to run 8 strips of 5 diodes.
I think that the library has a limit on the number of instances of the NeoPixel class. Try instead of 8 short strips to use 4 pcs twice as long

Indeed, according to the raspberry pi forum post I mirrored from here (Pico fizzles out with more than 8 Neomatrix strips - Raspberry Pi Forums), the issue is the raspberry pi PIOs, which have a maximum of 8. Any more than 8 instances will freeze the device.

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