Help with Nextion display

Hi,

Can anyone give me a little guidance? What I would like to do is store a serial command from a nextion display into to the arduino memory, so when the program goes through it’s loop and calls the subroutines they can check the memory allocation to see if that operation is required.

i.e.

LCD screen button is pressed and sends out a serial string such as “65 0 2 0 ffff ffff ffff”

This is stored somewhere

The arduino goes through it’s loop:
Operation 1
Operation 2
Operation 3
etc…

with each operation they look at the “somewhere” and see if the serial string is correct for it’s operation

I have seen this code is used for serial print

String message = myNextion.listen(); //check for message
if (message != “”) { // if a message is received…
Serial.println(message); //…print it out}

What I would like to do is have a code something like this

void loop()

String message = myNextion.listen();

write received serial string to somewhere;

operation 1();

operation 2() ;

void operation1()

Read //somewhere;

if (//somewhere == “65 0 2 0 ffff ffff ffff”) {//do the following operation};

etc

This is stored somewhere

Show us where!

I have seen this code is used for serial print

The first two lines in the snippet have NOTHING to do with the fact that the last line prints the String object to the serial port.

if (//somewhere == "65 0 2 0 ffff ffff ffff") {//do the following operation};

That "somewhere" is message!