I'm using this library to convert a float to a string: http://www.arduino.cc/playground/Main/FloatToString?action=sourceblock&ref=1 .
This is the snippet of code, where printing out flt looks like "29.37":
float flt = tempSensor.getTemperature();
char buffer[25];
char str[20];
Serial.print(floatToString(str, flt, 2, 10));
This should work out of the box, but doesn't - what did I do wring? These are my compile errors:
.../floatToString.h:11: error: expected primary-expression before ',' token .../floatToString.h: In function 'char* floatToString(char*, float, int, int, bool)': .../floatToString.h:11: error: default argument missing for parameter 5 of 'char* floatToString(char*, float, int, int, bool)' .../floatToString.h:73: error: 'itoa' was not declared in this scope .../floatToString.h:89: error: 'itoa' was not declared in this scope