<?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: Mac r5 Displaying &#34;double&#34; type variables</title>
		<link>http://forums.leaflabs.com/topic.php?id=868</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:23:25 +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=868" rel="self" type="application/rss+xml" />

		<item>
			<title>mbolivar on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5308</link>
			<pubDate>Fri, 17 Jun 2011 11:54:25 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">5308@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;iRobotGoddard,&#60;/p&#62;
&#60;p&#62;I am unable to reproduce your issue using Maple IDE 0.0.11 on OS X 10.6.7, using a Maple Rev 5.&#60;/p&#62;
&#60;p&#62;I copy-pasted your code and successfully compiled and uploaded it to Flash, with no region overflowing.  When I connect to the Maple using the IDE's serial port monitor, the doubles are printed to 2 decimal digits of accuracy, in keeping with the behavior documented here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.11/lang/api/serialusb.html#USBSerial::print__double&#34; rel=&#34;nofollow&#34;&#62;http://static.leaflabs.com/pub/leaflabs/maple-docs/0.0.11/lang/api/serialusb.html#USBSerial::print__double&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Are you sure you have &#34;LeafLabs Maple Rev 3+ To Flash&#34; selected in the Tools &#38;gt; Board menu, and that the correct serial port was chosen from Tools &#38;gt; Serial Port?&#60;/p&#62;
&#60;p&#62;edit: add more info on my config
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iRobotGoddard on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5294</link>
			<pubDate>Fri, 17 Jun 2011 08:43:19 +0000</pubDate>
			<dc:creator>iRobotGoddard</dc:creator>
			<guid isPermaLink="false">5294@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;well I just went over the page information, and it says that they come in a bundle. I am not able to calculate &#34;long&#34; or &#34;double&#34; values on my Mac, it states that there is an error and it will not compile.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robodude666 on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5293</link>
			<pubDate>Fri, 17 Jun 2011 08:41:18 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">5293@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;MapleIDE/libmaple 0.0.12 will be released when &#60;a href=&#34;http://wiki.leaflabs.com/index.php?title=Blocking_Changes&#34;&#62;blocking&#60;/a&#62; changes are complete. Based on the issue tracker on &#60;a href=&#34;http://code.google.com/p/leaflabs/issues/list?can=2&#38;amp;q=milestone=0.0.12&#38;amp;colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&#34;&#62;google code&#60;/a&#62; there are only a small handful, however I cannot say when it aught to be out. The team is hard at work though, I'm sure.&#60;/p&#62;
&#60;p&#62;There is an article in the docs on how to setup the linux &#60;a href=&#34;http://leaflabs.com/docs/unix-toolchain.html&#34;&#62;toolchain&#60;/a&#62; with libmaple. Similar instructions apply for Windows, though I don't think they're documented. You may be able to download libmaple from the github repo and replace your current MapleIDE's libmaple with it, though I'm not sure how well it will work.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iRobotGoddard on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5292</link>
			<pubDate>Fri, 17 Jun 2011 07:56:27 +0000</pubDate>
			<dc:creator>iRobotGoddard</dc:creator>
			<guid isPermaLink="false">5292@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Oh ok. i'm using the IDE, can uSend me the link to the libmaple? And does anyone know when IDE 12 will b released?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robodude666 on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5272</link>
			<pubDate>Thu, 16 Jun 2011 16:31:35 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">5272@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Are you using the IDE or libmaple from the github repo? A &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=844#post-5056&#34;&#62;similar&#60;/a&#62; problem was reported last week. This bug was fixed in libmaple; not sure if  it made it to the IDE yet.&#60;/p&#62;
&#60;p&#62;If you're using libmaple, make sure to update it. If you're using the MapleIDE, you can use &#60;code&#62;sprintf&#60;/code&#62; or &#60;code&#62;gcvt&#60;/code&#62; until 0.0.12 or 0.1.0 come out with this fix.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iRobotGoddard on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5269</link>
			<pubDate>Thu, 16 Jun 2011 15:58:02 +0000</pubDate>
			<dc:creator>iRobotGoddard</dc:creator>
			<guid isPermaLink="false">5269@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ok, now it's running, but it will still not produce decimal values....only integer values.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5268</link>
			<pubDate>Thu, 16 Jun 2011 15:50:55 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">5268@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Oh, I forgot to mention. If there is a program currently stored in the RAM of the device, it will run that program - RAM takes precedence over FLASH. &#60;/p&#62;
&#60;p&#62;To correct the problem, unplug and replug.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iRobotGoddard on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5267</link>
			<pubDate>Thu, 16 Jun 2011 15:16:24 +0000</pubDate>
			<dc:creator>iRobotGoddard</dc:creator>
			<guid isPermaLink="false">5267@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Going to build using 'armcompiler' (ARM)&#60;br /&#62;
	Compiling core...&#60;br /&#62;
	No libraries to compile.&#60;br /&#62;
	Compiling the sketch...&#60;br /&#62;
	Linking...&#60;/p&#62;
&#60;p&#62;elf section &#60;code&#62;.data&#38;#39; will not fit in region&#60;/code&#62;ram'&#60;br /&#62;
/Applications/MapleIDE.app/Contents/Resources/Java/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: region `ram' overflowed by 1208 bytes&#60;/p&#62;
&#60;p&#62;collect2: ld returned 1 exit status&#60;br /&#62;
------------------------------------------------&#60;/p&#62;
&#60;p&#62;that is what came up when I did the RAM option, but when I do the FLASH option it prints strings from a completely different program.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5266</link>
			<pubDate>Thu, 16 Jun 2011 14:52:45 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">5266@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hmmm. just tested this code, seems fine. Do you have the correct serial port selected from the tools-&#38;gt;serial port menu? sometimes you can force the OS to open up a new serial port number if break the first one. For example, if you open the serial monitor before the device actually jumps to user code (its still in the bootloader) then the OS will fail to open the serial port for the device since you already have it open in the monitor window. &#60;/p&#62;
&#60;p&#62;The solution is to wait a few seconds before opening the serial port window after reset. &#60;/p&#62;
&#60;p&#62;try this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;void setup() {
   waitForButtonPress();
   SerialUSB.println(&#38;quot;Does this at least print?&#38;quot;);
}

void loop() {
   double val = 1.5;
   SerialUSB.println(val);
   delay(20);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then upload, wait 5 seconds, open the serial monitor, and hit the button. If there is a problem with printing doubles, the first message should print, but not the rest.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iRobotGoddard on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5265</link>
			<pubDate>Thu, 16 Jun 2011 14:24:53 +0000</pubDate>
			<dc:creator>iRobotGoddard</dc:creator>
			<guid isPermaLink="false">5265@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;thank you it did compile and upload....but now nothing is printing in the serial monitor....
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5262</link>
			<pubDate>Thu, 16 Jun 2011 14:08:05 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">5262@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;You probably dont mean to be compiling to RAM. Not only do you have less space to work with, but the code is also stored in volatile memory, which means you loose it during a power-down. &#60;/p&#62;
&#60;p&#62;I recommend switching to flash, by selecting &#34;Maple Rev3/5 Flash&#34; from the tools-&#38;gt;board menu. This will give you 5 times the amount of program storage space to play with! (~100KB)&#60;/p&#62;
&#60;p&#62;The reason you see such a drastic change in program size, is because calling SerialUSB.print on a double/float requires the library to pull in a ton of new code to print decimal numerals.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iRobotGoddard on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5261</link>
			<pubDate>Thu, 16 Jun 2011 13:49:24 +0000</pubDate>
			<dc:creator>iRobotGoddard</dc:creator>
			<guid isPermaLink="false">5261@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;//this is the code below&#60;/p&#62;
&#60;p&#62;double value = 0;&#60;/p&#62;
&#60;p&#62;void setup() {&#60;/p&#62;
&#60;p&#62;}&#60;/p&#62;
&#60;p&#62;void loop() {&#60;/p&#62;
&#60;p&#62;    value+=1.05;&#60;br /&#62;
    SerialUSB.println(value);&#60;br /&#62;
    delay(20);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;//this is the offending line of code&#60;br /&#62;
//this happens with double, float, and long&#60;/p&#62;
&#60;p&#62;Going to build using 'armcompiler' (ARM)&#60;br /&#62;
	Compiling core...&#60;br /&#62;
	No libraries to compile.&#60;br /&#62;
	Compiling the sketch...&#60;br /&#62;
	Linking...&#60;/p&#62;
&#60;p&#62;elf section &#60;code&#62;.data&#38;#39; will not fit in region&#60;/code&#62;ram'&#60;br /&#62;
/Applications/MapleIDE.app/Contents/Resources/Java/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/bin/ld: region `ram' overflowed by 1040 bytes&#60;/p&#62;
&#60;p&#62;collect2: ld returned 1 exit status&#60;/p&#62;
&#60;p&#62;//It's an overflowing issue, but I'm thinking this is still related to the limitation of the USB when working w/ a Mac
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5259</link>
			<pubDate>Thu, 16 Jun 2011 13:39:01 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">5259@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;can you post the offending line of code and the result?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iRobotGoddard on "Mac r5 Displaying &#34;double&#34; type variables"</title>
			<link>http://forums.leaflabs.com/topic.php?id=868#post-5258</link>
			<pubDate>Thu, 16 Jun 2011 13:18:46 +0000</pubDate>
			<dc:creator>iRobotGoddard</dc:creator>
			<guid isPermaLink="false">5258@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I am calculating numbers that are larger than the scale of &#34;int&#34; type variables. It was explained to that the USB has issues when working with newer operating systems, i.e. Mac OSx, Windows 7, etc. It was easily solved using a delay, but it's not working for &#34;long&#34; type variables. Can anyone help, I'm thinking of just resorting to using an FTDI chip.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
