Start a new topic

change text color from arduino

Hi, I want to change text color for simple button according to the state of arduino input state. 

I try this but not working:

void loop()

{

buttonStateI1 = digitalRead(I1); // I1 is I/O pin 8 in uno

  if (buttonStateI1==LOW)

  {

    if (buttonState1I1!=buttonStateI1)

    {

delay(20);

  Serial.print("page0.b1.pco0=63488 ");

//Serial.print("b1.pco2=");

//Serial.print(63488);

//Serial.print(ref b1);

   // Serial.write(0xff);

//Serial.write(0xff);

  //Serial.write(0xff);

}  

 buttonState1I1=buttonStateI1;

 nexLoop(nex_listen_list); // Check for any touch event

};

I get the right command from mcu in nextion editor as shown in  picture.


image

Please any advise!

thanks in advance 

1 Comment

An erie silience is heard whistling through the air.

Tumbleweed blows past and cobwebs are everywhere.

 

You begin to notice almost every thread states:

This forum is closed since Nov 15, 2017

 

Use the new forum at nextion.itead.cc

it has been open since September 2017.