Start a new topic

change variable from arduino


Hello,

I try to change the value of a variable from arduino one.


Serial.print ( "va0.val="):

Serial.print(1);

Serial.write(0xff);

Serial.write(0xff);

Serial.write(0xff);


But I see:

0 255 255 255


And the value of my variable does not change, I don't know if it's possible to change the variable


Sorry if there is an equal ticket!



thanks




Statement as written attempted to stored 1 in va0.val of the current page.



Yes, my intention is to change the value in the current page but it does not

Perhaps you are not looking to send a byte value of 1 (0x01) 

   but maybe the text value of 1 (0x31)

Perhaps 

  Serial.print("1");

  Serial.print(1,DEC);


Arduino usage of print is in Arduino Reference at arduino.cc

Okay, I look at it

 

To change the value of .txt the same thing happens to me in the simulator


my code in nextion is:


if(t0.txt=="2")

{

  doevents 

}else if(t0.txt=="0")

{

  //delay=4000

  page 8 

}else

{

  //delay=4500

  page 9 

}


I in the simulator I put t0.txt="0"         and still does not change the value. The initial value is 2.

Okay, now change the value but not the page TT

Research scope.

Login or Signup to post a comment