I'm trying to set my temperature measurements to two decimal places. Currently what I get are six decimal places. Here is my code:
#include "math.h" ... (in loop) temp1 = sensors.getTempCByIndex(0); temp1 = roundf(temp1*100)/100;
Once I push temp1 to Firebase realtime database there are sic decimals, such as 26.059999. I'm using dsb20 sensor for temperature measurements. What could be wrong?
Thanks for your help in advance!