-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ILI9341 & ESP32 - Unable to open JPEGs from SD Card - File Not Found #87
Comments
I have written this function to test the SD card before I even try to draw the JPEG and it fails to open the file:
So I simply do not understand why I can open TFT files and print them, but I cannot open JPEG files! Here is the debug output:
|
Further information, out of interest, I have changed the sketch to use LittleFS, leaving everything the same, which works... In the setup:
Draw function:
Render function:
|
So, this was a huge red herring, as it was an SD card problem. I am driving multiple SPI devices using FET switches and the BUS was getting upset. However, although I fixed the SD card access and I did manage to get a part of a JPEG displayed from SD, there was a memory issue, as a third of a way through each image, the screen corrupted with colour blocks, which I didn't experience at all using LittleFS. Apologies if you have read this far… But all is not lost. I therefore wrote a function to copy the JPEG files into LittleFS and then used the If anyone reads this in Star Date 48000, any feedback on why the SD card image doesn't fully display, would be appreciated. |
I'm using an ESP32, ILI9341, which I can control with fill back grounds, draw lines etc. I can read text files and display them from the SD card using Serial.print, but no matter what I try for JPEGs, it says "Jpeg file not found"
I reverted back to the Arduino 1.8 IDE, removed all the libraries and reinstalled. This has made no difference.
These are my includes:
My TFT declaration:
Within the setup, I initialise the displays, set various background colours, all in sequence, then I call the function to draw the JPEG as follows:
As you can see, I perform a little test to ensure the SD card is addressable and working, which it is.
Here is the drawJpeg function:
It fails to open the listed file and I do not understand why? I have used FILE_READ as well as it is currently. The SD card works and therefore all GPIOs are correct. All TFTs are operational as I can control them independently, currently 10 displays, increasing to 25 assuming I can solve this issue.
To get the following line working:
boolean decoded = JpegDec.decodeSdFile(jpegFile);
I had to edit the
JPEGDecoder.h
file as follows:All I can say is... HELP!
The text was updated successfully, but these errors were encountered: