I have made a temperature sensor function that returns a float number with 6 digit after the . (eg: 28.500000)
Using:
float fTemp;
...
printf("Temp = %.1f", fTemp);
I can limit the temperature decimal to one, and everything is fine. (eg; 28.5)
Now I would like to pass the tempere to my Xively account and I have this function:
extern xi_datapoint_t* xi_set_value_f32( xi_datapoint_t* dp, float v );
How can I convert temperature value float to one decimal and pass it to the xi_set_value_f32?
Thank you, dk