Seithan / EasyNextionLibrary

A simple library for Nextion display that uses only four functions. You can easily benefit from Nextion's wide range of features and advantages in just a few easy steps. The library uses a custom protocol that can prove to be a powerful tool for advanced users as it can be easily modified to meet one’s needs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReadNumber() is returning incorrect values

mphohio opened this issue · comments

I have four number fields that contain integers representing different temperature values (I only need to use integers for this project) and when I read the values from the Nextion display I get a strange 10 position number. For example, I'll send a temperature of 70 degrees from the ESP32-S3 to the Nextion and the value is properly displayed in the number field. I have a button in the display that will update the temperature value in the display (using one of the Nextion built-in keyboards) and then call a Trigger back to the ESP32-S3. When the ESP32-S3 tries to read the new value using readNumber() I get the following: 4278190150. I get this same number no matter what I change the temperature value too. When the Nextion page refreshes the displayed temperature value will be -16. I tried int and uint32_t with no difference.

I've tried:

`int fan1temp;

fan1Temp = myNex.readNumber("page1.n0.val");`

The Serial.print(fan1Temp) = 4278190150

I also tried:

`unit32_t newTemp;

newTemp = myNex.readNumber("page1.n0.val");`

and get the same value as above

Everything else in the display is working fine. Any suggestions would be appreciated.

Mike