Start a new topic

help - ON - OFF Button and change txt content value


please help;

   with a button, when is pressed once, I send a value via serial, and when is pressed again, another value - like on/off; this work nice.

 In the same time, I need to change text box content when is pressed once , I need to write on t0.txt content value "1" . when is pressed second time txt value I need to be "0"
 I try it with timer, and a variable but without success .

place Variable va0 on page with button

in Button's Touch Pressed Event



cov va0.val,t0.txt,0



// this section handle if button value 1

printh 01



// this section handle if button value 0

printh 00


1 person likes this

 thank you again Patrick Martin,

your code work now as I expected, 

it was an error but, after some time of search and learn :)  all is ok now

one "=" missed

still not get what %2 do it (mean) ..
 two number variation?

Login or Signup to post a comment