I have imported a couple pictures. The are numbered 0 to 10.
Is it posible tho load a picture with a command from the Arduino.
This is my code but it not working:
/* load picture and display */
void updatePicture(int picture_nr)
{
Serial2.print("p0.pic=\""); // Changing the value of pic
Serial2.print(String(picture_nr));
Serial2.print("\"");
Serial2.write(0xff); // We always have to send this three lines after each command sent to the nextion display.
Serial2.write(0xff);
Serial2.write(0xff);
}
Or is it posible to load a picture from the sd card. I have a 4.3" P version
Thanks for any help.
Additionally, if you want the ordinal of a single character (a.k.a. just one number, not an array of chars/numbers), you can use single quotes (more details):
int quotes = '"';
Serial.print("ASCII code of the character \" : ");
Serial.print(quotes);
=> ASCII code of the character " : 34
This should be more readable than using "\x22".
Kind regards,
Max
This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).