<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>transitlab &#187; code</title>
	<atom:link href="http://transitlab.org/tags/code/feed" rel="self" type="application/rss+xml" />
	<link>http://transitlab.org</link>
	<description>thinking about technology, art and science</description>
	<lastBuildDate>Mon, 02 Jan 2012 16:31:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>processing as a quick video capture program on OSX</title>
		<link>http://transitlab.org/2008/processing-as-a-quick-video-capture-program-on-osx</link>
		<comments>http://transitlab.org/2008/processing-as-a-quick-video-capture-program-on-osx#comments</comments>
		<pubDate>Thu, 18 Sep 2008 10:59:14 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[simplemovies]]></category>

		<guid isPermaLink="false">http://transitlab.org/?p=149</guid>
		<description><![CDATA[Processing.org has a nice video capture library that is suitable for quick videos for documentation, I am using it to capture some arduino experiments with the external isight camera call and response code follows&#8230;. //import processing.video.*; MovieMaker mm; //the moviemaker container Capture myCapture; //your webcam, isight void setup() { size(320, 240); myCapture = new Capture(this, [...]]]></description>
			<content:encoded><![CDATA[	<p id="top" />Processing.org has a nice video capture library that is suitable for quick videos for documentation, I am using it to capture some arduino experiments with the external isight camera<a href="http://blog.transitlab.org/wp-content/uploads/2008/09/callandresponse.mov"></a></p>
	<p><a href="http://blog.transitlab.org/wp-content/uploads/2008/09/callandresponse.mov">call and response</a></p>
	<p>code follows&#8230;.</p>
	<p><span id="more-149"></span></p>
	<blockquote><p>//import processing.video.*;</p>
	<p>MovieMaker mm; //the moviemaker container<br />
Capture myCapture; //your webcam, isight</p>
	<p>void setup() {<br />
size(320, 240);</p>
	<p>myCapture = new Capture(this, width,height);<br />
//myCapture.settings(); uncomment this if you want to select the video source<br />
mm = new MovieMaker(this, width, height, &#8220;callandresponse2.mov&#8221;,30,MovieMaker.H263, MovieMaker.HIGH); // Save compressed, at 30 frames per second, h263, high quality</p>
	<p>}</p>
	<p>void captureEvent(Capture myCapture) {<br />
myCapture.read();<br />
}</p>
	<p>void draw() {<br />
image(myCapture,0,0);<br />
// Add window&#8217;s pixels to movie<br />
mm.addFrame();<br />
}</p>
	<p>void keyPressed() {<br />
if (key == &#8216; &#8216;) {<br />
// Finish the movie if space bar is pressed<br />
mm.finish();<br />
// Quit running the sketch once the file is written<br />
exit();<br />
}<br />
}</p></blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftransitlab.org%2F2008%2Fprocessing-as-a-quick-video-capture-program-on-osx&amp;title=processing%20as%20a%20quick%20video%20capture%20program%20on%20OSX" id="wpa2a_2"><img src="http://transitlab.org/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://transitlab.org/2008/processing-as-a-quick-video-capture-program-on-osx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blog.transitlab.org/wp-content/uploads/2008/09/callandresponse.mov" length="1193291" type="video/quicktime" />
		</item>
		<item>
		<title>syntax highlighting of arduino code in jedit</title>
		<link>http://transitlab.org/2008/syntax-highlighting-of-arduino-code-in-jedit</link>
		<comments>http://transitlab.org/2008/syntax-highlighting-of-arduino-code-in-jedit#comments</comments>
		<pubDate>Thu, 05 Jun 2008 19:52:51 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[eeepc]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[jedit]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[rgb]]></category>
		<category><![CDATA[syntax  highlighting]]></category>

		<guid isPermaLink="false">http://transitlab.org/?p=45</guid>
		<description><![CDATA[Image via Wikipedia My eeepc has a small screen which some programs don&#8217;t handle well. The arduino programming environment (the same as processing) doesn&#8217;t always handle it very well (like having the scroll bar disappear occasionally). However, it is possible to use an external editor. Personally, I like jedit and its code highlighting. Problem is [...]]]></description>
			<content:encoded><![CDATA[<p id="top" /><div class="zemanta-img" style="margin: 1em; float: right; display: block;"><a href="http://commons.wikipedia.org/wiki/Image:JEdit.png"><img style="border: medium none ; display: block;" src="http://upload.wikimedia.org/wikipedia/commons/2/27/JEdit.png" alt="jEdit" /> </a>
<p class="zemanta-img-attribution">Image via <a href="http://commons.wikipedia.org/wiki/Image:JEdit.png" target="_blank">Wikipedia</a></p>

</div>
My eeepc has a small screen which some programs don&#8217;t handle well. The arduino programming environment (the same as processing) doesn&#8217;t always handle it very well (like having the scroll bar disappear occasionally). However, it is possible to use an external editor. Personally, I like jedit and its code highlighting. Problem is that it dosen&#8217;t recognise the extension *.pde as a c-like style.

<span id="more-45"></span>

<strong>Before</strong>

<a class="flickr-image" title="no code highlighting jedit" href="http://www.flickr.com/photos/84755943@N00/2553781791/" title="no code highlighting jedit" class="flickr-image"><img src="http://farm4.static.flickr.com/3119/2553781791_47af2e9b72.jpg" alt="no code highlighting jedit" /> </a>

<strong>After</strong>

<a class="flickr-image" title="code highlighting" href="http://www.flickr.com/photos/84755943@N00/2553778011/" title="code highlighting" class="flickr-image"><img src="http://farm4.static.flickr.com/3086/2553778011_76da9ec3c3.jpg" alt="code highlighting" /> </a>

It&#8217;s easy to fix, go into /jedit/modes/catalog file and change the c entry to the following

&lt;MODE NAME=&quot;c&quot; FILE=&quot;c.xml&quot;
FILE_NAME_GLOB=&quot;*{.c,pde}&quot; /&gt;

Now I get code highlighting, so it&#8217;s off to do some more playing with RGB leds and Arduino.

<a class="flickr-image" title="glowing pingpong ball cropped" href="http://www.flickr.com/photos/84755943@N00/2554506682/" title="glowing pingpong ball cropped" class="flickr-image">
</a>

<a class="flickr-image" title="MVI_0020" href="http://www.flickr.com/photos/84755943@N00/2548150021/" title="MVI_0020" class="flickr-image">
</a>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/c3b518c9-4621-4d61-901d-e16f37d1dc18/" title="Zemified by Zemanta" class="zemanta-pixie-a"><img class="zemanta-pixie-img" style="border: medium none ; float: right;" src="http://img.zemanta.com/reblog_b.png?x-id=c3b518c9-4621-4d61-901d-e16f37d1dc18" alt="Zemanta Pixie" /> </a></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftransitlab.org%2F2008%2Fsyntax-highlighting-of-arduino-code-in-jedit&amp;title=syntax%20highlighting%20of%20arduino%20code%20in%20jedit" id="wpa2a_4"><img src="http://transitlab.org/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://transitlab.org/2008/syntax-highlighting-of-arduino-code-in-jedit/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

