The Nextion HMI Solutions page is accessed via
Help menuitem of the Help Menu within the Nextion Editor.
- this launches in the web browser.
- from here the most important links and sublinks are listed.
The RTC does not have direct component user access per se
- Nextion firmware remains a closed source HMI product
just the same as iPhone doesn't make docs in Microchip format.
- there is no such datasheet available for the
which RTC, GPIO, EEPROM, MCU, or proprietary display used
The Nextion does have a growing list of available commands
- these commands have begun evolving into a pseudo language
and not really a language per se, but certainly order of commands
produces varied results - just as normal programming does.
All available commands and explanations - Nextion Instruction Set.
How to arrange them is indeed a form of coding.
As an HMI product touch is sent to user side MCU
- user can process press/release events as needed by user MCU
- more advanced some logic can be device side
The available resources to learn are found in
- the Nextion HMI Solutions page
- the sub links of the Nextion HMI Solutions page.
- here the Instruction set will be found command / descriptions
- tutorial with example code
- an Arduino Library (good as framework for any other)
- links to next most important items in learning
Help menuitem of the Help Menu in Nextion Editor
RTC variable descriptions are in Nextion Instruction Set
The triple 0xFF termination is three times mentioned
in the Nextion Instruction Set (most important page)
- quick accessed via Search Bar "Nextion Instruction Set"
The firmware has made simple text of RTC without having to
go through Datasheets of RTCs and STM32s
simple text, no parameters - just use variable and good.
There is no accusations of any stealing of code
- the debate was using hobbyists to debug for commercial code
That thread had two full RTC examples
a basic example in full code using if statements
- code in full view on thread
an advanced example using the b[id] component array
- instructions in full view and included working HMI file
When your code failed,
- you did not follow the directions as posted
- you did not compare to the testRTC.HMI working code
- I stated if the advanced (b array) is too difficult, use
the more basic approach - also in same thread full code.
As for descriptions of the commands
- debate this after Nextion Instruction Set has been read.
The Nextion Instruction Set
- is simplified to text in and bytes out
- the format of is described here in Nextion Instruction Set
the Nextion TTL Serial thread.
This is so that it works with any MCU capable of TTL Serial
- almost every command Nextion side can be used serial
with the exception of blocks (if, else, while, for) and
excepting bulk data (rept, wept, addt)
10,000+ MCUs, in over 100 programming languages
But user side MCU knowledge is prerequisite
for this, it is the user that chose
- the MCU that they intend to use
- the programming language that they will use
- the compiler that they intend to use
Nextion is not limited to one Arduino in Arduino C++
but any MCU with Hardware Serial or by bitbanging two pins
But indeed the user needs to know their MCU side
and how to send bytes over their hard/soft serial
So in short
Help menuitem of the Help menu in Nextion Editor
- all most important knowledge starts here (and sub links)
btw., which programming language and compiler do you use on PIC side ... ?
How to notify the MCU of Press/Release of a Button
This is indeed covered in the Tutorials
In Debug mode in the Return Data
will send corresponding eight byte 0x65 touch return codes
- described in Nextion Instruction Set Section 6
How to turn a button off from MCU side ...
define logic of turning off a button ...
If button component - this is a momentary component
how was it ever left in an on state to be determined
- but triggering the corresponding release with click command
If not a button component but a dual-state button component
on or off state is determined by its .val attribute
therefore sending the reverse of setting on is required
If not a button or dual-state button component
the reverse of setting on is required
examination of logic on to create logic off
such as picture components
p0.pic=3ÿÿÿ being on and p0.pic=4ÿÿÿ being off
The Nextion Instruction Set
as brief as it is
Represents the set of commands accepted by Nextion
Assigning component attributes MAYBE less obvious
but still logical (used in examples and almost all threads)
when local scope component.attribute=valueÿÿÿ
when global scope pagename.component.attribute=valueÿÿÿ
There isn't a complex data sheet but only simple wiki of commands as
the Nextion is indeed not complex.
- lack of float - Nextion is integer based 6000/2001=2 (corrected)
- lack of order of operations - full assignment on operator
- lack of complex evaluation - nest in simple evaluations
Nextion is simple, but impressive when used for HMI
A more advanced topic is the page index/component array
- study the keyboard code as base example
.key attribute of Text Component/Number Component.
Huge discussions/debates on RTC
- where is source of official time?
If Nextion is official source, as in stand-alone
(can be, as in user referring wrist to set)
Then official source is only bubble of space surrounding Nextion
If official source is not Nextion,
then Nextion RTC is only a slave
To do as it is told to do - chosen how my programmer of MCU
This debate on RTCs and source of real time is decades old.
- you will have fanatics on all sides of the debate
What source, how to transport, how to adjust, how to ...
Why create a time bubble around device
Why time displayed should be thought of as accurate at all
Drifts in crystal oscillation, why yours isn't good enough
Why your replacement choice isn't good enough
Why algorithms for correction is flawed and not good enough
When did Aliens bring time to mankind ....
Who gave time to them ...
Why quantum made all of it moot ...
Serial update already slow, inaccuracy because of delay over serial
Button press reaction time, did operator have triple expresso or decaf.
The term interrupt used in to capture button press"
- is suggestive of an external button connected to MCU
as Nextion does not have any interrupts.
But there will also be 100 paths to get to Rome on this one.
I think you now have a better understanding of
- what Nextion is about
- where all the commands are located (such as they are)
- where to find examples, tutorials
Fast speedy development - check send component id
What remains is a blank programmable canvas
- the more time spent by the artist, the better it becomes
- the programming of Nextion internal logic - a user choice
and here, so much becomes possible.
MCU should always remain in control of HMI.
- so happy coding =)
as last, please keep a thread clean. One problem, one thread in the correct forum. This makes it much more easy for everybody out, to find and read the information he/she looks for ... nobody will go thru a 5 pages thread to find finally an important thread-headline-unrelated tip.
That's it ... just have fun ...