Start a new topic

Can click event be executed from Arduino?

I was wondering if there is a way to call the "click" eventof a button from the Arduino controller?

I see the "getText" and "setText", methods, but I want to invoke the click event.


Thanks,

Tiny


To gain access to the click events you describe

 - you have to implicitly unlock this feature


 - using clues from Nextion Instruction Set

 - using clues from Iteadlib *.cpp code files


Good luck on your quest to unlock this feature

@Tony

Maybe you can use the Touch Press Event or Touch Release Event associated with the button.

You can choose between 'Send Component ID' and your own 'User Code', as in this example:


image

Sorry, I think I misunderstood your question.

You actually want to do the opposite, that means you want to send a command from Arduino to Nextion.

Then you can use the 'click' command, as explained in the Nextion Instruction Set:

https://www.itead.cc/wiki/Nextion_Instruction_Set#click:_Activate_component.27s_press.2Frelease_event

Sending click from Arduino triggers code inside press/release event on Nextion side

This is advantageous for implementation of a Nextion side "function"


To do so from the MCU side with Iteadlib

   sendCommand("click m1,1");

Adjusted for object and if press or release side code


Login or Signup to post a comment