-->
Page 1 of 1

String and Float

PostPosted: Wed Oct 21, 2015 7:08 am
by JohnPap70
Hi to everyone!

I was compiling some code with the ESP8266 and the Arduino IDE. I was trying to add a floating point value to a string inside the Up.write function. But I am always getting an error message.

How I can resolve that?

For example:
Code: Select allfloat position;
position = 23.5;
Udp.write("Value is" + position);


But this creates errors. Any help on that?

Re: String and Float

PostPosted: Wed Oct 21, 2015 8:04 am
by kolban
What are the nature of the errors? What messages (if any) are produced?

Re: String and Float

PostPosted: Wed Oct 21, 2015 11:23 am
by ppet
I think this will work
String(position)