Unofficial Nextion/TJC User Forum

Use of sendCommand

Hello, I have been using (in testing) the sendCommand for the backlight, I am using the ITEADLIB_Arduino_Nextion-master library.

so this was working fine, but jast in last few days its not . ! (love that).

the project is quite complex and running on ESP32, as I said it was testing fine,

all other Nextion / TJC are fine, there are a number pages and lot of info and buttons, the backlight control is simply a sleep mode to set the backlight off / low or 100%,

the code is simply,

sendCommand(“dim = 5”);

or

sendCommand(“dim = 100”);

the library is ITEADLIB_Arduino_Nextion-master, as I said there is a lot of code, and up to now its been fine…

any thoughts?

thanks

Try to not use space in command string.

ok thanks, I can test that tomorrow, thanks.

@bobsterr , apologies been a little crazy here.
that suggestion was correct,
I found the Auto format was adding in a space, hmm,

I used the format like:

LCD_Current_Backlight = 100;
dim = “dim=” + String(LCD_Set_Backlight);
sendCommand(dim.c_str());
Promo.show();
Current_page = 6;

and that is fine, (there are probably other methods, but that works,[if it aint broke don’t try to fix it,])
:slight_smile:

thanks,


This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).