int getFileFrames(char* file) { File f = SPIFFS.open(file, "r"); String line; int n = -1; int result; if (!f) { Serial.println("Cannot open file!"); return -1; } else { while(f.available() && n<0) { line = f.readStringUntil('\n'); n = line.lastIndexOf("FRAME_COUNT"); } String strFrameNumber = line.substring(n+12); result = strFrameNumber.toInt(); } f.close(); return result; } void playFile(char* file, int framespeed) { int frameNumber = getFileFrames(file); int n = -1; RgbColor *anim[64];; //uint8_t anim[frameNumber][64*3]; File f = SPIFFS.open(file, "r"); String line; char rgbChar[8]; // load file into array if (!f) { Serial.println("Cannot open file!"); return; } else { // forward to first hex number while(f.available() && n<0) { line = f.readStringUntil('\n'); n = line.lastIndexOf("0x"); } for(int frame=0; frame>8 & 0xFF, rgb>>16); strip.SetPixelColor( i*8+j , *anim[i*8+j]); strip.SetPixelColor( 64+i*8+j , *anim[i*8+j]); } line = f.readStringUntil('\n'); } strip.Show(); delay(framespeed); if(frame>8 & 0xFF, rgb>>16); strip.SetPixelColor( i*8+j , *lanim[i*8+j]); rgbStr=rline.substring(4+i*12,4+i*12+6); rgb = strtol(rgbStr.c_str(), NULL, 16); ranim[i*8+j] = new RgbColor(rgb & 0xFF, rgb>>8 & 0xFF, rgb>>16); strip.SetPixelColor( 64+i*8+j , *ranim[i*8+j]); } lline = lf.readStringUntil('\n'); rline = rf.readStringUntil('\n'); } strip.Show(); delay(framespeed); if(frame>8 & 0xFF, rgb>>16); strip.SetPixelColor( i*8+j , *anim[i*8+j]); } line = f.readStringUntil('\n'); } strip.Show(); delay(framespeed); if(frame