Trouble using the String constructor to convert a float to a string.

When using the following code:

void setup() {
  // put your setup code here, to run once:
float test = 1.123;

String TestString = String(test, 3);


}

I get the error message:

"call of overloaded 'String(float&, int)' is ambiguous."

As far as I can tell I am using the String constructor exactly as instructed by the Arduino page explaining it. Also I can convert ints to string just fine using the string constructor. The problem only occurs with floats and doubles.

I am on version 1.8.2 but I doubt that is the problem.

Also the board I am working with is an Intel Edison based PLC from Maxim Integrated which requires its own library. Could that causes issues with the core Arduino features?

It was the Maxim stuff :frowning:

I just did a clean install of 1.8.2 on my other computer and it compiled.

Do you know of any other way to convert my floats to strings?

Delta_G:
I'm pretty sure I could get a megabyte of data faster by smoke signals.

Use a pigeon :wink: This is now 8 years old but still funny: Pigeon beats Telkom