Arduino Mega, Nextion LCD usage hardware serial RX and TX

Hello everyone,

I have a project about tft screen with arduino mega. When I press the button of nextion LCD, it sends 7 bytes. For example : 66 52 FF FF 33 FF 32.

I need receive the RX data from arduino. As far as I know, it fills seven RX Buffer with such a data. The question is: How can i handle the data and process the data ? Which arduino code block does provide this function for me? For example:

for ( i = 0; i < 7; ++i )
{
switch (Rx_Buffer*)*
{

  • …*
    }
    }
    Is it possible without Nextion.h arduino library? Thanks in advance.

As far as I know, it fills seven RX Buffer with such a data.

It MIGHT place 7 values in the incoming serial buffer, that you can read with Serial.read().

Firstly, I really thank you for your answer. I create a question involuntarily. How can I reach the buffers? For example:

for (i=0; i<7; i++)
{
Serial.read() = Rx_Buffer*;*
}