One more Nextion question:
I have an interface where you can enter a code. If the code is 5411, the Arduino code finds this to be true and sets a button text to "Complete!"
The code:
NexButton Matrix = NexButton(1, 2, "b23"); //on page 1
NexButton MSubmit = NexButton(4, 1, "b12"); //on page 4
NexText MHeader = NexText(4, 15, "t1"); //on page 4
void MSubmitPopCallback(void *ptr) {
if(matrixcode == "5411") {
MHeader.setText("Correct!");
Matrix.setText("Compleet!");
}
matrixcode = "";
}
All the playing to enter the code is on page 4, and MHeader.txt is working correctly.
The problem is that Matrix.txt doesn't change.
I have been playing and figured that if I make it:
NexButton Matrix = NexButton(1, 2, "b2"); //on page 1
the "b2" on page 4 is changed to "Complete!" instead of the b2 on page 1!
So apparently the Nextion doesn't write cross-page.
Does anyone know a solution?