<?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: multiple files with IDE</title>
		<link>http://forums.leaflabs.com/topic.php?id=1408</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:18:04 +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=1408" rel="self" type="application/rss+xml" />

		<item>
			<title>Wingnut on "multiple files with IDE"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1408#post-8489</link>
			<pubDate>Sat, 03 Mar 2012 16:56:44 +0000</pubDate>
			<dc:creator>Wingnut</dc:creator>
			<guid isPermaLink="false">8489@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I think I got it. &#60;/p&#62;
&#60;p&#62;It requires a combination of .h and .pde files.  You have to specifically #include your .h files, and you then can put your functions in .pde files in the same directory.&#60;/p&#62;
&#60;p&#62;So... for me, I have files called states.h and states.pde... now everything seems to work as it should...&#60;/p&#62;
&#60;p&#62;(Thanks for hinting me in the right direction... that never would have occurred to me... )&#60;/p&#62;
&#60;p&#62;Jay
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Wingnut on "multiple files with IDE"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1408#post-8488</link>
			<pubDate>Sat, 03 Mar 2012 16:24:41 +0000</pubDate>
			<dc:creator>Wingnut</dc:creator>
			<guid isPermaLink="false">8488@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Second file name is just called testme.c&#60;/p&#62;
&#60;p&#62;(Does the file extension matter?  I'm sure the answer to this is something super-chimp simple... )&#60;/p&#62;
&#60;p&#62;Jay
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "multiple files with IDE"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1408#post-8485</link>
			<pubDate>Sat, 03 Mar 2012 13:11:45 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">8485@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;What are you calling the second file? Specifically, what is its file name extension, .pde, .c, nothing?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Wingnut on "multiple files with IDE"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1408#post-8472</link>
			<pubDate>Sat, 03 Mar 2012 02:57:40 +0000</pubDate>
			<dc:creator>Wingnut</dc:creator>
			<guid isPermaLink="false">8472@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Yes, I've tried multiple ways to 'add' new files into the IDE sketch.&#60;/p&#62;
&#60;p&#62;Nothing seems to work.&#60;/p&#62;
&#60;p&#62;Here is the base problem... all custom &#34;black magic&#34; removed in my code.&#60;/p&#62;
&#60;p&#62;If I create a new IDE sketch, and put in JUST the following code:&#60;/p&#62;
&#60;p&#62;---------------------&#60;br /&#62;
void loop()&#60;/p&#62;
&#60;p&#62;{digitalWrite(0,HIGH);}&#60;/p&#62;
&#60;p&#62;void setup()&#60;br /&#62;
{}&#60;br /&#62;
---------------------&#60;/p&#62;
&#60;p&#62;and then I add a new file to the IDE... and put the following code in:&#60;/p&#62;
&#60;p&#62;void test()&#60;br /&#62;
{digitalWrite(0,HIGH);}&#60;/p&#62;
&#60;p&#62;I get a compile error. &#60;/p&#62;
&#60;p&#62;Anything that uses stuff like HIGH, LOW, SerialUSB, etc can't be broken out to separate files... &#60;/p&#62;
&#60;p&#62;Anyone have any other ideas?&#60;/p&#62;
&#60;p&#62;Jay
&#60;/p&#62;</description>
		</item>
		<item>
			<title>okie on "multiple files with IDE"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1408#post-8447</link>
			<pubDate>Fri, 02 Mar 2012 11:25:30 +0000</pubDate>
			<dc:creator>okie</dc:creator>
			<guid isPermaLink="false">8447@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;digitalWrite, LOW, and HIGH are defined in io.h. Wiring.h includes io.h and all the files that make up the Arduino/Wiring-like functions (it's Wirish because it defines a very similar set of functions). Are you using the Maple IDE or the command-line tools? There's a quick tutorial here that might be helpful if you're moving away from the IDE:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://leaflabs.com/docs/unix-toolchain.html&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/unix-toolchain.html&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I remember there being a thread here with good suggestions that discussed different ways of structuring a project if you want to add your own separate files in a libmaple project without the IDE.&#60;/p&#62;
&#60;p&#62;Doh, I just realized that your subject says you're using the IDE! You should add new files by clicking the &#34;-&#38;gt;&#34; on the right side of the tabs bar and then &#34;New Tab&#34;. You don't have to include this new file anywhere, as the IDE concatenates all of the tabs into one file before compilation. Also, wiring.h is included already by default even though you don't see it. If I go ahead and include it anyway, I don't get any compilation errors.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Wingnut on "multiple files with IDE"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1408#post-8441</link>
			<pubDate>Thu, 01 Mar 2012 20:37:15 +0000</pubDate>
			<dc:creator>Wingnut</dc:creator>
			<guid isPermaLink="false">8441@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Warning:  C++ noob.&#60;/p&#62;
&#60;p&#62;I've been stumbling around my C++ program for my maple board for the past few weeks, and have it generally doing what I want/need.&#60;/p&#62;
&#60;p&#62;My program is contained in a single file, and I decided to try to break this thing apart into separate files to get many of the &#34;tried and true&#34; and &#34;core functions&#34; out of the way.&#60;/p&#62;
&#60;p&#62;I read in the docs that the sketches use the same global namespace, and that they are essentially sewn together with a single #include Wiring.h statement...&#60;/p&#62;
&#60;p&#62;... but when I take a single function like:&#60;/p&#62;
&#60;p&#62;void foo()&#60;br /&#62;
{digitalWrite(0,LOW);}&#60;/p&#62;
&#60;p&#62;I get a compile error:&#60;br /&#62;
&#34;LOW UNDECLARED:  (first use in this function)&#34;&#60;/p&#62;
&#60;p&#62;I've tried blindly including Wiring.h (which creates it's own compiling disaster)...&#60;/p&#62;
&#60;p&#62;... can anyone steer me in the right direction?&#60;/p&#62;
&#60;p&#62;Jay
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
