Nextion Display Mega 2560

Hello,

I am trying to create a second page (page 1) in my project (see attached) on the nextion screen.

Page 0 as is works fine (dials, date, time, brightness, etc.)

When I add a next page button to my page 0, using the nextion editor, the screen changes to page 1 fine, but my serial port (using the serial monitor in the Arduino software) then starts spitting out three questions marks, (all back to front). When I then return to my page 0, everything is then perfect again. The debug utility in the nextion software does not show any errors when I change pages, just when it is all connected to the Arduino.

I have attached my Arduino sketch and my Nextion HMI file in the hope that someone can tell me whats happening.

Notes: -

Although the Arduino sketch name refers to 2 nextion pages, all of this code is used to feed/listen to what appears on nextion page 0, because I cant get page 1 working.

I have put a temp button on Page 0 to flip to page 1, and a button on page 1 to flip to page 0 using the nextion page command. This is so I can use as-is until I can get the mutiple pages working.

If you check in the nextion SW, you will see that my correct page 0 is ready and waiting (picture ID2)

Any help will be greatly appreciated.

Cheers

Daniel

Ard-Mega-2_page_v1600.ino (18 KB)

WaterTank1068.HMI.zip (733 KB)

Ard-Mega-2_page_v1600.ino (18 KB)

Hello Dforster,
Welcome to the forum.

I've looked at your HMI file and it looks OK to me.

From your description I assume you are using the Nextion libraries. The only thing I know about them is they are full of bugs. There is also not much support for them on these fora, so you are unlikely to get much help from here for them unfortunately.

For the bugs go to 'using Nextion displays with Arduino' at the top of the displays forum and look for the link to Ray Livingston's version of the libraries; Ray has extensively re-written them to remove the bugs. If they don't help then your options are to either try the methods I set out in the tutorial or devise your own methods.

Good luck.

Cheers Perry,

I will take a peek and see how it goes.

Happy Christmas

Dan