I'm working on a peripheral controller (Adafruit Metro Mini) to handle a ring of 24 NeoPixels and a pressure monitor with release valve. The code is in it development, and much of it is commented out because I've been trying to isolate my problem to no avail so far. Basically, it should be taking instructions over Serial in the form "ring static x single n", where x is 2, 3, 4, 6, 8, 12, or 24 and n is any 16-bit unsigned integer and changing the pattern of the ring accordingly. Unfortunately, it invariably stops responding after 1 or 2 messages, although a Serial reset can usually fix that. Just now, however, it failed by printing the message "ready" over and over...which is in the setup routine and therefore should only ever happen once. The three files that are relevant here are:
FHK-76.ino (8.5 KB)
Ring.cpp (7.0 KB)
Ring.h (1.4 KB)
I've been wracking my brain here but I cannot for the life of me figure out what's wrong mainly because the results are inconsistent (sometimes it works, sometimes it doesn't, and occasionally I get stuck in an infinite loop of the setup routine). Any help or insight would be greatly appreciated.