f = LittleFS.open("/f.txt", "r");
while (f.available()) {
String X = f.readStringUntil(',');
int Y = X.toInt();
// do stuff with Y - pixel information for LED Array
}
f.close();
The f.open() function seems to take a bit of time. My question is, how to read continuously values from the same file without closing and re-opening it again every time? Also, is a .csv file the best way to store an array of bytes in LittleFS?
My current approach is to load the entire .csv into an array stored in RAM, however 64K doesn't go very far.