0

I have a Nextion 7 inch enhance type display. I have enabled sleep using thsp = 120 and thup = 1 line of code. Now display become sleep mode after 2min, if there is no any touch event.

But, this sleeping is completely turn off the display.

I have several pages and I want to reset to a specific page, if there is no any touch event in any page instead of sleep function.

Greatly appreciate if someone can give a solution for this.

1

I solved the problem using a Nextion timer. (tm0)

I got a timer and change tim value. ( unfortunately Nexion allow to maximum to 65535mS). vscope should be globle, otherwise you cant use timer in every page.

I reset the timer in page touch event. In timer event I put this code.

if(tm0.tim==60000) //reset time in mS
{
   page 0 //specific page to load
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.