Start a new topic

t0.txt value to send on serial

Hi,


I have on display like a phone keypad, and I need to send via serial, a value of 9 numbers inserted on t0.txt with this, like 123456789

the numbers appear correctly on t0 , all 9 but when I pres first (1) this is already on serial send, and I need to send all 9 together , please help.

 

t0.txt=t0.txt+"1"   for 1

t0.txt=t0.txt+"2"  for 2  , etc.

 


no one help ?
...

First send a request to the display to retrieve the current value. Concatenate the values on your microcontroller and set the new value on the display.


1 person likes this

I had the same.


First page init at display should delete the textfield if you want it empty

then your button 0 to 9 do it like you have:

t0.txt=t0.txt+"1" // for ONE button


Then you have an Enter-Button.

This button get the value of t0 so you have all values together and you can do with it what you want.



2 people like this

And keep in mind that you need to increase the field length (default max 10) txt-maxl.


1 person likes this

Thank you for help, all is ok now !
  Another request please:
Now, if t0.txt has t-maxl 9 digits,

on next number pressed from keypad (the 10 digit to say),

 I need to switch to t1,txt to write value; how can  do this?

or, is another method to select t1.txt, and insert value with the same keypad , on the same page?

i think this should be possible with an if statement.

if t0 < 999999999

t0.txt=t0.txt+"1" // for ONE button

else

t1.txt=t1.txt+"1" // for ONE button


so that for every button


not sure if this will work in that way but it should.

Login or Signup to post a comment