I want to turn page only when my text contains two characters but I have no idea how to do it, can anyone tell me how?
read the Nextion Instruction Set ...
Reading of the Nextion Instruction May require more than random selection.
More than one command of Nextion Instruction Set may apply
Combinations of more than one May be necessary.
When you can begin to effectively describe EXACTLY what you want done
and how you COULD go about achieving it - USING the AVAILABLE commands
- then you can use this mental logic to program Nextion logic or MCU logic
Otherwise continue to try to EXACTINGLY describe what you are trying to do.
When it doesn't give the desired result - you left something out.
I want to "turn page" ...
- change to another page? or rotate current page by 90° CCW?
when "my text"
- what text? Nextion and MCU needs to know WHICH text
contains "two characters"
- not descriptive enough, WHICH two characters, or ANY two characters
Also what tools and resources are you using to try to accomplish
- some tools can do, others will not be able to do
With no knowledge of what is available to use in solution
Which MCU is used?
What Programming Language used?
Which compiler is used?
What library and supporting code is used?
What hardware is available to use towards the solution?
- motor drivers, power sources, servos and type of ?
What has been tried already and what were the result?
so how do the numbers end up into t0?
See, the more you describe exactly what needs to be done,
the more the solution is already in front of you.
Entire project is exercise in describing exactly to
Nextion or MCU what it is that you want done
MCU will only ever do EXACTLY as told to do
- result not as expected = missing steps
missing steps = missing thinking = unexpected results
There are always many many ways to achieve task in programming.
Best is always if you use your thinking on how to get from point A to point B
- when you try to use someone else's method,
you will mosly find it difficult to follow "their" train of thought at the time they wrote it.
- trying to figure out someones train of thought from code is called debugging.
So best is yours
use // at beginning of line to make comment and notes
In three weeks after you set it down
even you will wonder what you were thinking at the time.