Start a new topic

return to last page

ok, I have to say - 3 pages. all 3 have timer to go on 4th page

on the 4 is a dual stat button. Now, here I need to put a timer to return in last page;

if I was on page 2,after 2 sec that go to button on 4, then need to return back on 2, also for  others pages.
  that to not make more pages, who take more space...
No enhanced display.
 Thank you !


Patrick


did you check the video, i have shared the link again

EnaLucky


I was not able to view your youtube video, it appears it may no longer be there, or not public

Thank you so much for your support


Let me see if there is an easy explanation for coding around


Start with assignments like n0.val=1 and n1.val=n3.val*3+n2.val

Then move into conditionals like the if statement

Then loops like for and while


I will look

you are right


before nextion, i was programming Temp and Humidity controller with a simple LCD(1602, 2004, 128x64 or 7-segment) but all these are very simple and easy, upto all these, i was okay

Basically, i am Electrical Engineer and job for Extra High Voltage (13.8kV to 380kV) In Saudi Arabia

I love to play with Electro-Mechanical and Electronics

I am starter in programming

With Nextion, it is my 1st project, lots of things learned from you and others

i hope soon Nextion will be easy for me

Delay means delay .... do nothing .... so you see it worked as expected.

You will find a programming course to be a benefit.


Programming is done with a purpose, by ordering available commands

to achieve a task towards your goal.  Learning how to program and how

the MCU responds to various commands will be a benefit.

day before yesterday, you guide me to to put the delay function as pasted below;


in page1 touch release event put the Nextion code on Nextion side

page 2


in the page2 postInitialize event put the Nextion code on Nextion side

delay=2000

page 1

i used this but this delay was stopping my all program

Finally, i have deleted all the pages and gather all components and information on a single page and i used vis command and everything works fine

i got this idea from one of your instruction given to a person for hide/unhide 


Thanks for valuable support

well past midnight here - tomorrow is a busy day

in page1 touch release event put the Nextion code on Nextion side

page 2


in the page2 postInitialize event put the Nextion code on Nextion side

delay=2000

page 1


Your design is getting weird, you do no switch back and forth on a maybe

You only respond to something with a valid reason and with purpose

 - there is no mistakes, there is no maybe.



As you said, i have to use Preinitialize Event, a Postinitialize Event

with this situation, how i can set the time interval

suppose i have two pages

page1 and page2

Normally, page1 is always visible and when i touch the page1  then page2 suppose to be open and then stay for some interval, 

if don't touch page2 then come back to page1

if i touch the page2 then still stay and recount the time given 

but with doing all this all the parameters espacially on page2 must be active or should not reset.


Thanks got it

Pre and Post Events are in the Nextion Editor

Click on the page canvas, you will see

a Preinitialize Event, a Postinitialize Event, a Touch Event and a Release Event


In these events you can place whatever logic you need.

No need to make them, they just are there and run in the order I posted earlier.



1 person likes this

its mean this function is useless for my project


how to make Pre and Post ? is there any example code

Page Preinitialize

Page as per HMI design

Page Postinialize


If you are needing some value to persist, you must make use or Pre and Post

- when the page changes, the old is dumped, but after Pre and the new page.


When a page is not current, it is not in memory.

Nextion SRAM is 8K to 20K of which is shared with firmware

HMI portion is 3584 Bytes in Basic Models, and up to 8192 Bytes in Enhanced

Login or Signup to post a comment