Nextion getValue for Number box

Good day!

I am a newbie in programning and i made a simple prpject: my nextion display has a NexNumber and i tried using the getValue function but it doesn’t work.

What i want to happen is to use the eeprom of the arduino to store values from the NexNumber display. First is to get the value from the NexNumber box and store it to the eeprom of the arduino in case of power interruption. Then print the stored data to the NexNumber box once the arduino restarted.

I tried using constant values and the program successfully stored it to the eeprom. But when i use getValue to the NexNumber, it doesn’t work.

See the attached file for the full program (sorry i don’t have the copy of the .ino file)

The leftPushCallback and the rightPushCallback, speedUpPushCallback and speedDownPushCallback will be the trigger for writing values to eeprom (this is where the getValue function takes place since pushing the buttons will increment the number in the number box)
The spositionPushCallback and sspeedPushCallback will be the press event for reading the eeprom data and place it to the corresponding NexNumbers

nextionproject.txt (6.18 KB)

Hello AnIntern,

I was hoping someone else would reply.

Please read 'how to use this forum - please read', then go back and modify your post showing the code in code tags like it tells you in the instructions.

I know the Nextion well but not the Nextion libraries, so I can't help with a specific question about them. I suggest:

Have a look at my tutorial 'Using Nextion displays with Arduino', in there you will find a different way to use Nextion displays that doesn't use a library. Alternatively, if you prefer the library you will find a link to Ray Livingston's version of the Nextion libraries; he has fixed a lot of the bugs in them.

You have posted a long bit of code, go back and write something simple that illustrates the problem, that will make it easier for you and for anyone trying to help you to find the problem. Once you fix the simple version you can add all the other stuff you are trying to do.