My code only convert the fraction part of string to char. For example, the string is 123.8724; i get 0.8724
My code is:
if (inbyte == '!'){ // Handle delimiter, ! IS MY endline character.
for (int i =0;i< counter;i++)
{
data*.toCharArray(carray, 12); //put readStringinto an array*
float f = atof(carray + 1); //convert the array into an Integer*
chenni1:
My code only convert the fraction part of string to char. For example, the string is 123.8724; i get 0.8724
My code is:
if (inbyte == '!'){ // Handle delimiter, ! IS MY endline character.
for (int i =0;i< counter;i++)
{
data*.toCharArray(carray, 12); //put readStringinto an array*
float f = atof(carray + 1); //convert the array into an Integer*
desiredT = f;*
Serial.println(desiredT,5);*
}*
inbyte = 0;*
}* } [/quote] ```
if (inbyte == '!')
{
/// you get your string into a null terminated array somehow....