Problem getting values from Nextion display to Arduino


I am writhing to you because I can't manage to use the function getComponentText() or getComponentValue() from the nextion library with my Arduino Mega. Probably I'm doing something wrong but just can't find out what. I need to write values on the Nextion screen and store them into a variable inside my Arduino so that I can use it latter. Can someone help me?

I can write values from the Arduino to the Nextion screen but can't get the values I write on screen to the Arduino.

Hope someone can help me.

Best regards,

Hi and welcome.

I think you are thinking in the wrong order.
If you are sending data to the display, why do you need to read that data at some later stage ?
How about storing the data first, and write it to the display (perhaps from that storage) ?

"Writhing" may well be the case. :grinning:

You might want to consider changing to ESP8266 based development boards which are wifi enabled and pushing data to one Nextion display. We have development an interface board for Nextion display so that it can accept http requests for this purpose. Cheers

This use case is described here: