- Wed Jan 13, 2016 4:28 pm
#38712
Tanks jankop for your example.
Yes.. my software under PIC send eof for each line.. and there is 1 new line every 10 seconds. ( every line contain 3 number send as string in ascii )
like this :
127;14;1.08
... after 10 sec...
128;12;1.18
ecc.ecc.
....I'm trying to understand your code .. but in variable 'data' there is all string ?
I need to set variable for each number coming from serial.. each number coming as ascii string separated by ';' caracters.
sometings like this... ( not correct lua code.. )
tr = data[1] -- set variable tr with the first value coming from serial interfaces
print tr
-- i see 127
tp = data[2] -- set variable tp with the second value coming from serial interfaces
print tp
-- i see 14
ta = data[3] -- set variable ta with the last value coming from serial interfaces
print ta
-- i see 1.08
I did not understand ..
Thanks in advance,
Fabrizio.