Closed bogus105 closed 3 years ago
The example code for this alternative Jpeg library may help as a starting point.
That example displays a "slideshow" all jpeg files stored in SPIFFS. I think the ESP8266 does not have EEPROM, but data can be stored in SPIFFS from a sketch, see SPIFFS documentation. Clearly a menu could be created from the directory file list too.
Hi Bodmer,
thank you one more time for the library and support. I did big improvements in my firmware. The device i'm doing is driven by esp8266-12E and the screen is TFT ILI9341. The goal for me now is as follows:
To do number 3. i need to sort out how to scroll/slide show the photos on the TFT screen every time i press the button. And it is a problem for me as so far i can see that to decode JPEG i need to pass file name (not surprised:)) to decoding method and then push it to the screen by tft.pushImage... The chosen image (by long button press) should be 'remembered' somehow in EEPROM and should be automatically displayed on the TFT screen next time the device is switched on. So the problem i have is two fold:
For 1: I was thinking to name the files like: 1.jpg, 2.jpg, 3.jpg... but i can't sort out how to construct the function to create strings(?) to 'make' a file names to be decoded. Is there any method in SPIFFS to distinguish between files without knowing their actual names? Like "next file" in SPIFFS instead of pointing to the file name? For 2: Is there a way to check the JPEG file address in SPIFFS memory so i can store this address in EEPROM instead of storing the string containing the file name? Or maybe it is the best approach to store the string and just pass the string as an argument to the decoding function on start up?
Thank you for any input:)