SPIMemory library - Formerly SPIFlash - now supports SPI FRAM as well! :)

Hi,
I try to change from SD to SPIFlash and all is working fine so far. Absolutly great Job!
I try to load some picture (bmp) into the flash. I imagine to convert the image content in a string and then store into the flash.

think this is basically possible :roll_eyes:

Open requested file on SD card

  if ((bmpFile = SD.open(filename)) == NULL) {
    Serial.print("File not found");
    return;
  }

Convert to string

 String SD_Read;
  while (bmpFile.available()) {
    char ltr = bmpFile.read();
    SD_Read += ltr;
  }

Store to flash

  while (!flash.eraseSector(17, 0));


  if (flash.writeStr(17, 0, SD_Read)) {
    Serial.println("SAVED");
  } else {
    Serial.println("ERROR");
  }

then to display on the TFT, I have to read from Flash convert from String to File. :confused:

Did some one try this already?