     if (settings.mode == 'T') {
       EEPROM.put(eepromStart + sizeof(settings), text);
     }
+#endif
+#ifdef ESP32
+    EEPROM.commit();
 #endif
     saveTarget = 0;
 #if DEBUG

  lastFrameTime = millis();
}

void doFPS() {
// This is a no-op when DEBUG=false
#if DEBUG
  static byte totalLoops = 0;
  static long totalDurations = 0;
  totalDurations += lastFrameDuration;
  totalLoops++;
  if (totalLoops == 500) {
    Serial.print(F("FPS: "));
    Serial.println((float)totalLoops / (float)totalDurations * 1000.0);
    totalLoops = 0;
    totalDurations = 0;
  }
#endif
}
void loop() {
  lastFrameDuration = millis() - lastFrameTime;
  runMode();
  lastFrameTime = millis();
  FastLED.show();
  checkSerial();
  checkSave();
  doFPS();
}

inline bool isImaginary(byte x, byte y) {

    // hue means number of frames in this case
    settings.hue = min(settings.hue, MAX_FRAMES);
    if (settings.hue) {
      if (!STREAM.readBytes(ledFrames, settings.hue * NUM_LEDS)) {
#if DEBUG
        Serial.print(F("failed to read "));
        Serial.print(settings.hue);
        Serial.println(F(" image frames"));
#endif
        flushSerialIn();
        settings = previous;
      }
    } else if (previous.mode == 'P') {
