sumotoy / TFT_ILI9163C

A library for ILI9163C displays for Teensy, Arduino, ESP82266 and more...
169 stars 71 forks source link

Unable to pull image from SPIFFS #67

Open bvlet opened 6 years ago

bvlet commented 6 years ago

I can't seem to get your tft.drawImage to work with an *.c file stored in SPIFFS. I was using this code with another OLED:

  File f;
  // OPEN FILE (ENTER FILE WITH PATH WIRH SLASH IN FRONT)
  f = SPIFFS.open("/file.mono", "r");

  if (f) {
    int s = f.size();
    Serial.printf("File Opened , Size=%d\r\n", s);

    String data = f.readString();
    //Serial.println(data);

    const char* data1 = data.c_str();
    f.close();

    display.drawXbm(0, 0, 125, 60, data1);
    display.display();

but everything I tried in a similar way seems to fail..... Is this a bug or can you point me in the right direction to solve this?

BR, Bart