I am successfully uploading a 4 data streams to pachube, but today I just realized that using the below code a value of 8.06 is being uploaded as 8.6 ?? I believe I read somewhere that this is called padding. Can someone help me with a suggestion how to add padding to this code ? Many thanks.
int temp_Current1 = (temp_Current - (int)temp_Current)*100; int pH_val1 = (pH_val - (int)pH_val)*100; sprintf(pachube_data,"%0d.%d,%0d.%d,%d,%d,%d,%d",(int)temp_Current,abs(temp_Current1),(int)pH_val,abs(pH_val1),orp_val,orpSD_val, successes + 1, failures);