2016년 11월 17일 목요일

Splitting incoming text into two labels


I have hit a roadblock, and it is probably something really easy. But I was wondering if I could split incoming text into two labels. Label1 is the incoming bluetooth data. Example (temperature time) <- its a number then a space, then time. I want to split the incoming text where the temperature is in Label1 and after the space, time is in Label2.

Thank you.
 Screen Shot 2016-11-11 at 4.56.26 PM.png

-- 
use the split at spaces block to convert your string into a list

split at spaces


Divides the given text at any occurrence of a space, producing a list of the pieces.
then select the 1st and 2nd item

Taifun

-- 
How do I designate Label2 as the split portion of label1?

-- 
Create two local variables, the set the label 1 to the first variable, label2 to the second variable

-- 

댓글 없음:

댓글 쓰기