Start a new topic

sendme function available from arduino library

Hello, in order to tell MCU which page is the nextion I use a lot of buttons that otherwise would not use, I saw that one of the available commands is sendme that allows you to send the id of the page but it seems that the library does not Arduino the media, it would be faster to implement if it is treated as is done for the buttons, what do you say?

1 person likes this idea

 Yes, me too, I don't know if there any function to know what page we are, or

in editor in preinitialize or postinitialize when you send "sendme" where to catch this in arduino code like "send component ID" and catch with nexbutton.attachpop or attachpush.


I would like when a page is initialized put arduino sensor data in the components of that page.


thanks.

:( i think that isn't easy because is not implemented in actual arduino library.
if I'm not wrong, I think that preinitialization or postinitialization with attache funcions has to be with the
#define NEX_RET_CURRENT_PAGE_ID_HEAD (0x66) in nexHardware.cpp and nexLoop.

 

Has any one managed to get the sendme function working on Arduino?


I am now reviewing all of the Feature Requests, this will take some time, patience please.

This was not a feature request.  Please post questions in the Free Chat section

To answer the question

In the Page PostInitialization event - use the printh to simulate a page pressed event (for all pages)


In the Arduino code

- create a current_page variable to refer to

- use the page component attachPush for all pages

Define all pages to be included in listen set

Additionally, execute series of commands in attachPush function now that user has arrive.


Please post questions in the Free Chat section

Login or Signup to post a comment