@jotathebest
Hi again
I am wondering why Ubidots libraries donβt let me compile the function strtok.?
I am sending to the photon using Ubidots libraries the following string:
A77.99%80.35%80.15%36.72%78.31%110.97%78.33%81.27%
Those are 8 temperature values.
Using strtok I am recovering each of those temperatures like string values
Temp0 = strtok (Temp,"%");
Temp1 = strtok (NULL, β%β);
Temp2= strtok (NULL, β%β);
Temp3= strtok (NULL, β%β);
Temp4= strtok (NULL, β%β);
Temp5= strtok (NULL, β%β);
Temp6= strtok (NULL, β%β);
Temp7= strtok (NULL, β%β);
Then I assume I can convert those values to float, in such way that they can be sent to Ubidots dashboard.
sscanf(Temp0, β%fβ, &value0);
sscanf(Temp1, β%fβ, &value1);
sscanf(Temp2, β%fβ, &value2);
sscanf(Temp3, β%fβ, &value3);
sscanf(Temp4, β%fβ, &value4);
sscanf(Temp5, β%fβ, &value5);
sscanf(Temp6, β%fβ, &value6);
sscanf(Temp7, β%fβ, &value7);
The point is that the compiler only accepts the following statement:
Temp0 = strtok (Temp,"%");
*But NOT the followings ones, so it starts to throw errors:
Temp1 = strtok (NULL, β%β);
Temp2= strtok (NULL, β%β);
Temp3= strtok (NULL, β%β);
Temp4= strtok (NULL, β%β);
Temp5= strtok (NULL, β%β);
Temp6= strtok (NULL, β%β);
Temp7= strtok (NULL, β%β);
Thank you for some help.