Float to String

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
wdickenson
 
Posts: 184
Joined: Fri Nov 16, 2012 8:43 pm

Float to String

Post by wdickenson »

I have an object (dataOut) defined as a String (CapS)

I am building a string to send to an Xbee but one of the values I am sending is a float. So this line
dataOut += String(fvar); is causing me an ambigous reference.

If I define fvar as INT, it all works fine.

What am I doing wrong ?

User avatar
egutting
 
Posts: 297
Joined: Wed Nov 14, 2012 12:57 am

Re: Float to String

Post by egutting »

Look into dtostrf()...

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”