One of my small project consists of transferring an image from PC to ESP8266 which is connected to LCD ( for testing purposes I am using SSD1306 OLED screen). Images are changing every minute and are displayed with Adafruit GFX library. The setup is as follows:
1. 64x64 pixel monochrome BMP image is converted to hex string, like : "0x00, 0x00, 0x00, 0x00, 0x00, 0x00 etc.". It is saved as hex.txt;
2. hex.txt is transferred to ESP-12E SPIFFS. It could also be transferred as any other format, too.
3. Adafruit GFX library function for showing the image is as follows:
// drawBitmap() variant for RAM-resident (not PROGMEM) bitmaps.
drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color
, where "uint8_t *bitmap" is the source for that hex tring ("0x00, 0x00, 0x00, 0x00, 0x00, 0x00 etc.").
Sadly I have no programming background, therefore I have problems with loading and converting that hex.txt from SPIFFS to "uint8_t *bitmap" and still getting no errors on compiling the code.
What would be the right way to load the hex.txt and convert it to format which Adafruit GFX needs ( "uint8_t *bitmap" ) ?
P.S. I have no problems with loading the same image from PROGMEM.
Thanks!