Nextion boot time versus Arduino Nano

Hi folks ! To help others not spending useless time as I did, here is my share :
On power up using same rail 5V, Arduino boot time is slower than Nextion intelligent 5 inch display causing initial data sent from Nextion to Arduino to be lost, therefore some functionality is lost at cold start.
To overcome this, I had to add Nextion reset instruction to the very end of Arduino void setup .
In this way, data sent by Nextion at boot time is correctly catch by Arduino.
Also, to overcome missing call function I had to write the code inside a timer, set timer enable 0 and timer.tim=0 in main preinitialize page. At the end of the timer add self timer.en=0 to self disable. A button press can call it by tm1.en=1, code inside will be executed and timer will self close.
This is ugly , can be done using a dummy page also, but can be used as crude API if GPIO’s has to be controlled via touch and external PC software via FTDI.

Which Arduino are you talking about? I’d guess the timing problem exists rather with older and slower processors as used in the UNO or MEGA, but not forcibly on more modern hardware like ZERO or DUE.

NANO V3 ATmega328p which is a common uC to begin with.

My suggestion is for the Arduino to set a variable on the Nextion at startup and for the Nextion not to send any data until the variable is set.
Can also be useful if the Arduino wants to temporarily prevent the Nextion sending data whilst its busy.

With Nextion Editor 1.65, the data sequence which the Nextion sends at boot has been moved over from hard coded in the firmware to a printh command in program.s
Not sure if this can help with your issue, but there, you could modify the data sent at boot or insert a delay command before

1 Like

Thanks to all for replies ! So far I am good with an extra Nextion reset cmd in Arduino setup, for future projects I will keep in mind all the above !