Nextion "getValue" is a problem..... wont GET. lol

Im entering a number into the nextion screen as a setting value. using the code below to bring it into arduino to use and a variable. it keeps returning 0. Thats coming from here... uint32_t PreSet_FL = 0;

void b14PushCallback(void *ptr) // Press event for ride height setting 1
{
  uint32_t PreSet_FL = 0;
  
  n40.getValue(&PreSet_FL);
  
  Serial.print(PreSet_FL);
}

I have done a lot of searching without success. there is a lot of threads that just go cold

The Nextion libraries, as they provide them, are cr@p, most especially w.r.t. reporting events, and getting the values of Nextion variables. Whoever wrote that library had absolutely no clue what he was doing, and the handling of serial data is simply appallingly bad - it will randomly discard entire messages with no warning.

About 3 months ago I posted a modified copy of a few Nextion library files in the Displays section of this forum. Updating your library with those files will likely fix your problem.

Regards,
Ray L.

RayLivingston:
The Nextion libraries, as they provide them, are cr@p,

Absolutely, and cr@p is a very polite description.

That is only topped by the arrogance and unfriendliness of the Nextion forum moderators,
and maybe the fact that there is no (free) support of proportional fonts.

:wink:

I can offer a class that handles line reception on any Serial that supports Nextion message.

Poor library, arrogance And their tools still only works in windows (which means they unsurprisingly missed sales target a while back or lied)... so I’m ignoring them and not buying any of their products, consumer can vote with their wallet...

Content of the link:

You are here:Home-Is there a Mac or Linux version of Editor

Is there a Mac or Linux version of Editor

Sorry, currently we only have a Windows supported version. If we reach our sales goal in 2016, we will have enough budget to design the cross-platform web UI. Before that, we will focus on one platform. Ensure Microsoft .Net 3.5 is installed for Windows.

Others have used Windows virtual machines under Linux and Mac. Although user operating systems and used software is beyond the scope of Nextion support, it is possible.

By Patrick|October 10th, 201|Categories: General|0 Comments

RayLivingston:
The Nextion libraries, as they provide them, are cr@p, most especially w.r.t. reporting events, and getting the values of Nextion variables. Whoever wrote that library had absolutely no clue what he was doing, and the handling of serial data is simply appallingly bad - it will randomly discard entire messages with no warning.

About 3 months ago I posted a modified copy of a few Nextion library files in the Displays section of this forum. Updating your library with those files will likely fix your problem.

Regards,
Ray L.

We had already added these to my library. im scared to add these back as they didnt work the first time i added them. then you help work me though it.

Whandall:
Absolutely, and cr@p is a very polite description.

That is only topped by the arrogance and unfriendliness of the Nextion forum moderators,
and maybe the fact that there is no (free) support of proportional fonts.

:wink:

I can offer a class that handles line reception on any Serial that supports Nextion message.

GitHub - whandall/WhandallSerial: Non-blocking serial reception with callback and support for Nextion message format.

i was looking over your link. What would be a good way to get a value from nextion and us it as a variable in arduino?