NeoNextion icon indicating copy to clipboard operation
NeoNextion copied to clipboard

Lost Button Event

Open Wailshire opened this issue 5 years ago • 2 comments

Hello, i have have a small project whit text and buttons, the text changes whit a timer each 5 seconds, and i have a button also, but when i hit the button it wont work always. in the debugger i can see clearly that the screen send the data, and the texts that i changed, also change slow. is there a part in the library thats dont allow to send multiple values for text faster? because its kind of slow, thank you in advance

Wailshire avatar Feb 12 '20 02:02 Wailshire

I kind of have the same problem. Basically the mcu does not acknowledge a button pressed that is obviously validated as touched on the display. For now I can't tell what is the most limiting component here (nextion or neonextion or hardware).

In my case this happened after introducing some more code in the void loop(). Then button press skip started to occur.

I introduced some nex.poll() between the most demanding entry but that did not clearly fixed it. Only slightly improved it. And not a great solution I have to say.

Any recommendations to prevent this?

noeldum avatar Apr 05 '21 19:04 noeldum

I managed to improve this doing 2 things.

1/ Insert a delay(1000) at the top of setup(). No idea why this change anything but it does improve it a lot. Maybe starting the display before the mcu makes a difference. Really not sure what to think here.

2/ I modified the timeout of the softwareserial and increased it compared to default. nextionSerial.setTimeout(2000); That did the trick pretty well. Although I am not sure about having softwareserial becoming a 2 seconds blocker in my code.

Some overall progress. Nothing ideal for now.

noeldum avatar Apr 06 '21 12:04 noeldum