user10566: I'm transmitting: Temperature: 28.22C
and on the receiving end I'm receiving the whole tranmission as a string. I'm trying to spilt Temperature to leave it as a string and 28.22 as a float to compare, how do I do that ?
TX end hardware: (Arduino Uno board with Xbee S1)  to computer
RX end hardware: (Arduino Uno board with Xbee S2)  to computer

user10201: Okk very simple approach :-
Suppose this is your string variable inStr = "Temperature: 28.22C"
String inStr = "Temperature: 28.22C";
int indexOfSpace = inStr.indexOf(' ');
//this stores the address of the space character in the string.
int indexOfC = inStr.indexOf('C');

String Temp = inStr.substring(indexOfScace+1,indexOfC);
//as the parameter for the function is supposed to be the starting point of the string to
 be extracted and one more than its ending point.


//Now to convert to float

float TempFlo = Temp.toFloat();


10566: <p>I'm transmitting: Temperature: 28.22C</p>

<p>and on the receiving end I'm receiving the whole tranmission as a string. I'm trying to spilt Temperature to leave it as a string and 28.22 as a float to compare, how do I do that ?</p>

<p>TX end hardware: (Arduino Uno board with Xbee S1)  to computer
RX end hardware: (Arduino Uno board with Xbee S2)  to computer</p>
 10201: <p>Okk very simple approach :-</p>

<p>Suppose this is your string variable inStr = "Temperature: 28.22C"</p>

<pre><code>String inStr = "Temperature: 28.22C";
int indexOfSpace = inStr.indexOf(' ');
//this stores the address of the space character in the string.
int indexOfC = inStr.indexOf('C');

String Temp = inStr.substring(indexOfScace+1,indexOfC);
//as the parameter for the function is supposed to be the starting point of the string to
 be extracted and one more than its ending point.


//Now to convert to float

float TempFlo = Temp.toFloat();
</code></pre>
