My project (custom RC transmitter) has a Nextion display (NX8048P050-011C). There is an issue where the display will stop responding to incoming data over serial from the Arduino when navigating through the menu system (switching between menus makes the display unresponsive). I've also noticed there is a low humming sound when the display is unresponsive.
When testing using the Nextion editor's simulator; sending the commands that the Arduino would be sending over serial work fine. I don't know why I'm getting undesired behavior.
I'm using an Arduino mega pro mini as my MCU. I'm also using an SD card; which might be the/part of the issue.
Hello @ningaman151
Thanks for posting a schematic but it is blurred and unreadable. My preference, and I suspect most people's, is to have a schematic with lines to represent the connections, not 'join the dots' as you have it.
Please post your code here, not a link to somewhere else. If you have a lot of code then please write a small program that demonstrates the problem.
Sorry about the schematic being blurry; I updated it with a clearer one (still a bit blurry but readable). Sorry I don't understand what you mean; I'm using net ports to represent the connections, I find it clearer and easier to read that way. How would you recommend I draw the schematic? I use easyeda as my CAD tool.
For Nextion communications I'm not using a library anymore; I'm using a self made solution. Every time an event on the display occurs (such as a button press), it send 4 bytes: page, type, index, and command. And to send from the Arduino to the display I just send it the way you would do using the Nextion editor's simulator. I use functions which take the name of the component as one of it's parameters to generalise sending commands.
Thing is I don't know where the fault lies; so I don't know what code to share, so all of it is given .
I checked your reply; but now I'm using my own comms system and not using any libraries anymore.
I mean draw lines to show what is connected to what, you might find it easier to read the way you have drawn it, i find it nearly impossible. Read some of the other topics to see how schematics are usually drawn.
You haven't posted any code, you posted a link to somewhere else. Please re read my previous reply and do as requested if you want my help. Please also upload your HMI file in a zip folder.
Serial communication generally needs something to indicate the start or end of transmission, in my Nextion methods I use 0xa5 repeated 3 times at the start, Nextion themselves use 0xff repeated 3 times at the end. As far as I know prints does not send any start or end marker, your code certainly does not. Without start or end markers your receiving code can easily get out of sync and not know when the start or end of your data is.