1) How exactly sleep works? What it means? Screen is power off, but logic still working, right? Anything more to know?
2) Why sleep 1 used IN nextion touch event returns "invalid commant". it means that nextion can't go to sleep by itself?
I have no problem to sleep nextion from MCU, but how to assign sleep without MCU?
That is such a great question Mav.
- Passing out from exhaustion is not really sleep.
- So how to sleep properly is a good point.
- Oh, sleep with Nextions ... sorry
Sleep usually implies powering down to lower levels of resource consumption
- sleep=1 will put Nextion to bed, a lower powered state with subset of functions running
- sleep=0 will wake the Nextion up, back to full power consumption, all functions running.
The power on default is sleep=0.
So a power off and power back on will reset Nextion back to a fully powered state.
To sleep properly, one needs to be able to reawaken the Nextion, not just sleep=1
- so what is going to be our wake up trigger - this needs to be considered
- and under what conditions will Nextion doze off on its own.
- When we have these two things in mind, then we can proceed to set the conditions
There are three ways for the Nextion to doze off
In case anyone else was interested in knowing how to handle sleep without a timer, on a page - here is what I did:
Add the following lines, on a page's post-initialize event - the Nextion will enter sleep in 16 seconds if no touch command, and wake by touch command: