Adafruit_neopixel library with ESP32

rmtWrite(pin, led_data, numBytes * 8, RMT_WAIT_FOR_EVER)

Why would a call to this function, when trying to send color data to the WS2812 strip, cause my ESP32 to continually reset?

esp.c

void espShow(uint8_t pin, uint8_t *pixels, uint32_t numBytes, boolean is800KHz) 
{
  rmt_data_t led_data[numBytes * 8];

  if (!rmtInit(pin, RMT_TX_MODE, RMT_MEM_NUM_BLOCKS_1, 10000000)) 
  { 
    log_e("Failed to init RMT TX mode on pin %d", pin);
    return;
  }
  int i=0;
  for (int b=0; b < numBytes; b++) 
  {
    for (int bit=0; bit<8; bit++)
	{
      if ( pixels[b] & (1<<(7-bit))) 
	  {
        led_data[i].level0 = 1;
        led_data[i].duration0 = 8;
        led_data[i].level1 = 0;
        led_data[i].duration1 = 4;
      } 
	  else 
	  {
        led_data[i].level0 = 1;
        led_data[i].duration0 = 4;
        led_data[i].level1 = 0;
        led_data[i].duration1 = 8;
      }
      i++;
    }
  }

  //pinMode(pin, OUTPUT);  // don't do this, will cause the rmt to disable!
  rmtWrite(pin, led_data, numBytes * 8, RMT_WAIT_FOR_EVER);
}

I found a problem with using the neopixel library if I had more than 85 LEDs the ESP32 would continually reset
it appears to be a problem with the Espressif RMT library with ESP32 core V3
I found using Tools>Board Board manager to instal ESP32 core V2.0.17 fixed the problem for now

I think I just need to give up on EPS32 - there are just too many damn bugs in the core!!!!

I installed V2.0.17 and the reset problem goes away but now I get gpio_num error instead!

ESP32 is a losing battle!

what was the error message?

But hey the core is provided free of charge. I would say drop the Adafruit_neopixel, and don't update the core to the next main version until bug reports are seeping out.

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