<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: convert float/double/int to char</title>
		<link>http://forums.leaflabs.com/topic.php?id=9142</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:25:01 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=9142" rel="self" type="application/rss+xml" />

		<item>
			<title>rons on "convert float/double/int to char"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9142#post-20226</link>
			<pubDate>Mon, 08 Oct 2012 13:25:10 +0000</pubDate>
			<dc:creator>rons</dc:creator>
			<guid isPermaLink="false">20226@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thank you for all the replies.  Basically I was trying to cast an int to a char&#60;/p&#62;
&#60;p&#62;int a = 5;&#60;br /&#62;
char b[] = char(a);&#60;br /&#62;
char c[] = &#34;String 1&#34;;&#60;br /&#62;
char d[] = &#34;String 2&#34;;&#60;/p&#62;
&#60;p&#62;Serial1.print(b+c);&#60;br /&#62;
Serial1.print(c+d);&#60;/p&#62;
&#60;p&#62;c + d worked b + c did not.&#60;/p&#62;
&#60;p&#62;I will try out the methods you guys suggested when I get home from work.  Thanks again for the help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "convert float/double/int to char"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9142#post-20225</link>
			<pubDate>Mon, 08 Oct 2012 11:05:27 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">20225@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;If the requirement is to 'print' a float or double into an array of characters, then their is the Open Source newlib, which has a set of functions which do those conversions&#60;br /&#62;
&#60;a href=&#34;http://sourceware.org/newlib/&#34; rel=&#34;nofollow&#34;&#62;http://sourceware.org/newlib/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If you want to do it yourself, there is a &#60;code&#62;printFloat&#60;/code&#62; member function in Print.cpp which converst a double to a characters and prints them. It would give you a template; replace the use of &#60;code&#62;print()&#60;/code&#62; with storing the character into the &#60;code&#62;char&#60;/code&#62; array.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "convert float/double/int to char"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9142#post-20212</link>
			<pubDate>Sun, 07 Oct 2012 20:57:34 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">20212@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm going to go on a limb here and suggest you want a string stating the value of a float or integer rather than just a character representing the float/integer value.&#60;/p&#62;
&#60;p&#62;There is 2 methods I can suggest to fixing this issue, making your own function to convert it to a string or using sprintf.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "convert float/double/int to char"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9142#post-20208</link>
			<pubDate>Sun, 07 Oct 2012 17:27:08 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">20208@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Ron - what have you tried?&#60;/p&#62;
&#60;p&#62;When you write &#34;cant figure out how to covert or cast a float/double/int to char and concatenate it to another char.&#34; What are you trying to do?&#60;br /&#62;
Usually it is print a float/double/int as an array of characters, but you appear to be trying to convert a float/double/int to a single char. Would you give some examples of what you have, and what the value should look like.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rons on "convert float/double/int to char"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9142#post-20207</link>
			<pubDate>Sun, 07 Oct 2012 16:26:40 +0000</pubDate>
			<dc:creator>rons</dc:creator>
			<guid isPermaLink="false">20207@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;So I just got my maple board and I have been trying to send sensor data to a serial lcd (ezLCD301).  But I cant figure out how to covert or cast a float/double/int to char and concatenate it to another char.  Ive tried a bunch of things but nothing works.&#60;/p&#62;
&#60;p&#62;Any help would be appreciated.&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Ron
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
