Start a new topic


is it  possible for mcu to detect a event when timer is enabled / disabled .

Just like button is detected by b0.attachPush or Pop.

can one do it with t0.attachTimer?

I want to use a timer in nextion display and take a action on arduino side 

e.g. turn on/off relay.

Nextion Timer Component do not in and of themselves have a touch event

- therefore some other Component would have such touch event to start/stop them

Perhaps use the touch event of such component that is starting/stopping the timer

If the timer is triggered from MCU side then perhaps send command over serial

  sendCommand("tm0.en=1");  // trigger timer tm0 to start

  sendCommand("tm0.en=0");  // trigger timer tm0 to stop


Well its other way round

I am setting a timer from nextion display hardware

It stops after preset time.

after it stops I want detect that event on MCU side 

is it possible with to.attachTimer()


Do you have any luck in your question. I have the same problem.

"after it stops I want detect that event on MCU side "

I did the following

Set the timer in MCU by the nextion interface.

and do whatever  action you want to do on MCU side

Hi, Patrick Martin

Tried your suggestion given by you which came in my email. Nice one 




Timer is triggered with tm0.en=1

 - amount of timer is in tm0.tim

When this time runs out

 - disable timer tm0.en=0 to avoid repeat

 - notify MCU using printh time expired

If timer object was page 2, .id 7

printh 65 02 07 01 FF FF FF

Catch with MCU as Nextion Touch Release


Login or Signup to post a comment