Hi everyone, I'm trying to find sensor measurements in a string that I sent via serial communication. the format of the string is as follows: @"temperature"A"humidity"B/n
I have been trying to use the indexOf function but I don't know how to apply it, I don't know if someone could help me, I would really appreciate it.
no, it does not have quotes, it is only to indicate that there is a numerical value, and if it helped me, it served me well. Thank you very much, and how fast they respond in these forums, thank you very much
the functions strtod() and strtol() provide a better way to ensure you did read something correctly formatted. atof() and atoi() will just return 0 if they could not read a correct number and so can't differentiate without extra code if that 0 is the real value or if it's an error