Right, so I am starting on a function to send a jpg to the SD in the Nextion display. I am still not sure I understand what’s going on, but my function so far looks like this:
void nextionFunction::sendPicture(int16_t dataSize)
// send pkConst.
// send pkID. not sure what to send. is this linked to the twfile command so it knows where the data needs to go?
// send vType. CRC not really needed for starters since data is not all that critical. maybe later
// send dataSize. not quite sure what to send. the file size?
// send fileData. not sure what to send. do I send the whole file.read() at once?
The “twfile” command is sent before I call the above function. The twfile command does indeed create a new file with the size that I specified (in bytes). Naturally the file remains empty since it does not yet get filled with data. Funny though, I make a call to create a file with the name “cover.jpg” and get a file called “cover.jpg.tm”. Not sure what .tm means.
There are still a few points that are unclear about how to implement this. It would be great to see a full working example from Nextion.
I’ll keep at it and report progress, but help would of course be appreciated.