Start a new topic

Sleep Mode with Arduino

Hello,


I want to put the screen to sleep with Arduino command.

I use this library.


https://github.com/itead/ITEADLIB_Arduino_Nextion


I could not find this code in the library.

How can I do it?


Thanks...



I use this code but not work. Please check it picture.

.
.
.

And one question:


"dim=0"  and  "sleep=1"


Is it doing the same job?

Not in this manner.


dim=0 turns screen brightness very low

sleep=1 puts screen off and Nextion side MCU to sleep mode

 - sleep mode low voltage, subset of commands alive

 - listens for touch event or serial wake command sleep=0


Refer to Nextion Instruction Set System Variables.

  dim, dims, sleep, thup, ussp, thsp, and wup

Besides mere sleep, one must set triggerm and how to wake


sleep is system variable not NexNumber Number Component

sendCommand("sleep=1");


You could toggle sleep every 3 seconds, but not in any meaningful way

Try to use purposefully, such is like flicking switch on and off many times

 - it can lead to unintended result



sendCommand("sleep=1");


This information is for my very useful.


Very thansk Patrick, You're good man!

Login or Signup to post a comment