Unofficial Nextion/TJC User Forum

getText function not working

I have a text object on my HMI called ‘temp1’, my Arduino has the following 4 lines of code that works fine:

char buffer[10] = {0};
NexText temp1 = NexText(1, 52, “temp1”);
memset(buffer, 0, sizeof(buffer));
temp1.getText(buffer, sizeof(buffer));

But, I’d really like the function below to replace the buffer approach, but it just doesn’t work. I think there’s an error in the Library.

NexText temp1 = NexText(1, 52, “temp1”);

I found also lot of problems in nextion library usage, and because nextion not maintain it library version I created Enhanced version based on original, and corrected lot of bugs.

You can check if in my verison has some hints, or you can start to use it.

I’ll check it out. I’m using an Adafruit Feather M0 board with 2 serial ports, one software, one hardware. I hope your library will work with that setup.


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).