Have been trying to work this out for last hour and a half ?
I can trim the result after the decimal point, as in this example will output 1234.8
But Width part of dtostrf has no effect, (in this example it set to 2) what does it do ? as it seems to be to small for the whole number including decimal point , but it prints out correctly?
char buffer; float number = 1234.84; dtostrf(number,2,1,buffer); // dtostrf=(x,W,P,x) Width= Characters including dot & minus sign. Precision= Characters after decimal point. Serial.println(""); Serial.print(F("buffer = ")); Serial.println(buffer);