Start a new topic

How to change visibility from Arduino?

From my Arduino code how can I  change the visibility of an object such as a Text object, etc.


You tell me how you would do it with the Nextion

I'll tell you how you can do it with Arduino

1. ______________________________

2. ______________________________

3. ______________________________

Give me three Nextion side examples of

The Nextion side is vis obj,1 or 0 for show or hide.


so you gave the syntax ... now for your three examples.

Right I got that, but what about example Arduino code?

vis obj,1 or 0 isn't your example you need

So give me three you need - examples

I guess I can try it tomorrow morning as per doc.

I thought it might be t0.vis(0); not sure if syntax is correct?


  #include "Nextion.h"

  byte ter[3] = {255,255,255};

if you want t0 is go invisible, to hide it

 - Nextion is vis t0,0

 - Arduino is

     nexSerial.print("vis t0,0");


if you want t0 be visible, to show it

 - Nextion is vis t0,1

 - Arduino is

     nexSerial.print("vis t0,1");


You should note the similarity

You should note the three byte 0xFF 0xFF 0xFF terminator

I see.. makes sense. Good to know for other commands or functions, etc.

Cool, thanks!

Now to take a look at the example you gave.

Looking into NexText.h and NexText.cpp library files

 - there is no such vis function to form a t0.vis();

You could make one, but that wouldn't allow you to hide all or show all.

Most Arduino commands that can be set Nextion side

  is only a matter of sending it over the wire with a print Command.

If "Nextion.h" is in your #include (s)

 - You can even shorten this with  sendCommand("t0.vis,1");

 - as the sendCommand function in NexHardware.cpp adds the terminator.

So you should now have a better understanding of

 - know where the Nextion Instruction Set is

 - know to look in your library code

Very good... thanks!

Login or Signup to post a comment