Arduino.cc has tutorials for learning Arduino
Arduino code questions Arduino Forum
- but read such forum threads before posting question
when such answer already given, not smiled upon to ask again
You must be able to program 'your' chosen MCU in 'your' chosen language with 'your' chosen compiler.
It appears from your statements chosen compiler and language is 'Arduino C++' via Arduino IDE.
It is you who must tell your MCU the proper commands to accomplish your project.
I recommend you learn about your MCU and learn a language needed to communicate with MCU.
Do not take this task lightly, most MCUs are trusting their masters do not tell them to do something that will be harmful to them and result in their demise. But more importantly, as your project suggests 50A,
such ignorance of what you deal with is not benign and can cause harm. Because of this potential for failure that can be expected to cause bodily harm, potential for death, damage to property for yourself or others in the hands of the unknowledgeable ... And you have demonstrated a lack of such knowledge,
I will not be participating or contribute towards such potential failure.
Also take no offense to my response. I have also had blind person ask how to hook up high voltage relays, and as such safety has to play a bigger role. No one wants to be a contributor to such injuries.
Nextion is text based commands over TTL serial.
- Review Nextion Instruction Set
- Review Nextion TTL Serial thread
- Review code in Iteadlib Arduino Nextion Library
- review examples that come with library
But mostly commands are as stated in Nextion TTL Serial thread
- Arduino serial has .print() and .write() function to send text and three 0xFF termination.
- Arduino has .available and .read for reading Nextion replies
Refer to Nextion Instruction Set - Nextion Return Data
Only current page is in Memory on Nextion, with few globals in background
- current page is dumped to load next current page.
updating components on other pages when not current ... makes less sense
- the exception is global, and then only .txt and .val is stored, but not component or code
Nextion Editor Debug simulator can replicate most code items to see if correct.
- exception is Enhanced EEPROM (starting content unknown) and GPIO (connected to what)
Arduino has Serial Monitor for debugging Arduino side code.
Help menuitem of Help Menu in Nextion Editor launches Nextion HMI Solutions page in browser.
Datasheets and links to relevant info.
Most of what can be said of Nextion has been already stated in forum threads
- now mostly repeating questions of what has been already stated with fewer new topics
- Use Search Bar at top of every forum thread for more relevant results
You can wait to see if someone like to write code, but most busy on their projects
As such I will leave the thread open for other users to contribute
But still I find it difficult to build my own arduino code.
My biggest problem is how to display variables on different nextion pages.
I know this will take your time, but please I really need your help.
Before you write Arduino code for several pages, you must start by writing code for one page.
When you have done that, you can post your code here on the forum.
Then it will be a little easier to get help from other users.