The program below demonstrates some odd timings of neopixel calls. On some regular basis the call takes twice as long. There is odd non-monotonicity to the time it takes depending on the NUMPIXELS. 64 is weird, 57 is different and more weird &c. And the time taken does not seem to go up very rapidly with an increasing number of pixels, like if y = mx + b, m seems way too small even if we ignore that sometimes a larger number of pixels takes significantly less time.
Something else is going on, something obvious that you will kindly remind me about, or tell me what I never knew.
IDE 1.8.7, UNO, tried several. Does it matter - that I don’t really have a strip hooked up? I tell you I do not think so.
// warp core animation timing investigation
# define NUMPIXELS 64
# include <Adafruit_NeoPixel.h>
# define PIN 6
# define NLAMPS NUMPIXELS
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NLAMPS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(1000000L);
Serial.println("minimum example");
strip.begin();
strip.show();
}
unsigned char limit = 50;
unsigned long usTimer;
void loop()
{
usTimer = micros();
strip.show();
Serial.println(micros() - usTimer);
if (limit--) return;
for (; ; );
}
TIA
a7