Change Color of a Page - Nextion

Hi!

I'm trying to change the background color of a Nextion page via arduino code. Searching about, I found this mode only:

void mudarCor()
{
  nexSerial.print("page1.bco = 63488");
  nexSerial.write(0xFF);
  nexSerial.write(0xFF);
  nexSerial.write(0xFF);
}

But it doesn't work, unfortunately. I'm using the ITEADLIB lib.

Does anyone know how I can do this?

Thanks!

You could start by removing the probably offending blanks from the Nextion command,
and retest.

nexSerial.print("page1.bco=63488");

You can test the correct syntax from the Nextion GUI application.

That was it!

Now it worked, thanks!

1 Like

The Nextion documentation clearly states,
that blanks can only be used in very specific places as delimiter,
not to make the code more readable, as one would usually do.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.