Start a new topic

Arduino,Nextion and EEProm Problem

I have an interesting problem:

I tied an Arduino, a Nextion, a Clock module and an EEProm.

I used them with an interface of nextion.

Problem:

Every buttons, texts work right while I write into the eeprom. Then

the serial monitor showes this in an endless loop:

recvRetString[1,0]
recvRetString[1,3]
recvRetString[1,0]
recvRetString[1,3]
recvRetString[1,0]
recvRetString[1,3]
recvRetString[1,0]
recvRetString[1,3]
recvRetString[1,0]
recvRetString[1,3]

and the texts, buttons are gone bad, they don't work right and numbers appear on unuseable texts....


This was the same when I allow the clock continuesly write to nextion, but now I don't know where I take back things because the eeprom is written just once.


(Sorry about my english)

Thank you for your help


1 Comment

Without the hmi and complete code posted, it is certainly impossible to say where in your code your mistake has occurred.  If the code compiled - it will be doing exactly as you have told it to do.


Somewhere within your code you have created an endless loop that until it finishes (probably can't finish if it is endless) will keep on going.  The condition for escaping the loop to continue forward hasn't been met, or your code would have left the loop.  If serial data is being sent at the same time while in this loop and it is not being handled or cannot be handled until this loop has ended, that would lead to overloaded buffers and that leads to corrupted data.


Perhaps a delay needed to be inserted into your code after the eeprom write to ensure sufficient time for it to complete (the specs or data sheets usually give the required timings), but these are just guesses.


Without further details (which model Nextion, which Arduino, what eeprom, how configured, etc) it is truly hard to give any meaningful comments back.  I am uncertain from your description if your eeprom was a worm (write-once-read-many) or if it can be erased and start your project again - or if it was an observation that the eeprom was only given one command to write data.  If the eeprom creates such an impass, it may need to be removed and replaced - but more details would certainly be needed to determine if that is even a proper course of action.



Login or Signup to post a comment