<?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>The Daily Duino &#187; Processing</title>
	<atom:link href="http://dailyduino.com/archives/category/code/processing/feed" rel="self" type="application/rss+xml" />
	<link>http://dailyduino.com</link>
	<description>mostly daily arduino projects and news</description>
	<lastBuildDate>Fri, 04 Dec 2009 19:46:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Getting Started with Pachube &amp; Arduino</title>
		<link>http://dailyduino.com/archives/616</link>
		<comments>http://dailyduino.com/archives/616#comments</comments>
		<pubDate>Thu, 25 Jun 2009 13:18:50 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Optical]]></category>
		<category><![CDATA[Pachube]]></category>
		<category><![CDATA[Phone]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Based]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=616</guid>
		<description><![CDATA[Another post on Pachube and how easy it is to get setup and going. This post will cover the basic steps on how to get some sensors online!  I will be using my project of two light sensors as an example.  The status of my light sensors are viewable at http://www.pachube.com/feeds/2145 Pachube + Arduino from [...]]]></description>
			<content:encoded><![CDATA[<p>Another post on Pachube and how easy it is to get setup and going. This post will cover the basic steps on how to get some sensors online!  I will be using my project of two light sensors as an example.  The status of my light sensors are viewable at <a title="http://www.pachube.com/feeds/2145" href="http://www.pachube.com/feeds/2145" target="_blank">http://www.pachube.com/feeds/2145</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=5320339&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=5320339&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/5320339">Pachube + Arduino</a> from <a href="http://vimeo.com/morgellon">Morgellon</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><strong>STEP ONE: </strong><em>GET A PACHUBE ACCOUNT!</em></p>
<p>Head over to the <a title="http://www.pachube.com/" href="http://www.pachube.com/" target="_blank">Pachube</a> website and see various sensors from all over the world and view their status.  Be sure to view the <a title="http://community.pachube.com/about" href="http://community.pachube.com/about" target="_blank">ABOUT</a> page, this describes INPUTs and OUTPUTs, along with ways to interface with Pachube and your sensors.  The <a title="http://community.pachube.com/quickstart" href="http://community.pachube.com/quickstart" target="_blank">QUICKSTART</a> page has the details to get started and how to use your API.  Pachube is still in beta, so you&#8217;ll need to get an invite code&#8230; but no worries, Pachube has an email address on the QUICKSTART page.  Just send them and email asking for an invite and what you would like to do.  If they let me in&#8230; they will let anyone in! <img src='http://dailyduino.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>STEP TWO: </strong><em>PREPARE ARDUINO! </em></p>
<p>The Arduino can be interfaced with Pachube <strong>two</strong> ways: 1. With an Ethernet shield <strong>OR</strong> 2. Via USB connected to a PC running Processing&#8230; which is the way used in this tutorial&#8230; as I feel it is an easy and inexpensive way.  You can learn more about each way at the <a title="http://community.pachube.com/arduino" href="http://community.pachube.com/arduino" target="_blank">Pachube Arduino</a> page.</p>
<p>To prep the Arduino, you need to connect the sensors you will be using and <em><strong>verify</strong></em> <strong>that they are working correctly!</strong> Once the sensors are good, then upload the &#8220;Standard Firmata&#8221; to the Arduino.  Now the Arduino is prepped for Pachube!  Leave the Arduino connected to the PC.</p>
<p><strong>STEP THREE: </strong><em>PREPARE PROCESSING!</em></p>
<p>To have Processing communicate easily with Pachube, you will need to add a few libraries.  They are the Pachuino, Arduino and EEML libraries, they are available and there is more info at the <a title="http://community.pachube.com/node/13" href="http://community.pachube.com/node/13" target="_blank">PACHUINO</a> page.  Download, unzip and move them to the <strong>libraries</strong> folder, in your <strong>sketchbook</strong> folder.  Now Processing is ready!</p>
<p><strong>STEP FOUR: </strong><em>PREPARE INPUT FEED!</em></p>
<p>Once you have a Pachube account and your API key, go ahead and set up a new feed for your sensors.  Since I have light sensors, I started a new <a title="http://www.pachube.com/feeds/new" href="http://www.pachube.com/feeds/new" target="_blank">INPUT FEED</a>.  I chose to make my feed &#8220;manual&#8221; (as this is easier for me) which means Pachube gets updates only when I send them.  Instead of Pachube connecting directly to my PC to pull the info.</p>
<p><strong>STEP FIVE: </strong><em>PREPARE CODE FOR PROCESSING!</em></p>
<p>Once you have the libraries in the folder, you are ready to start Processing and start coding.  Below is the code I used for my light sensor.  This was taken from the sample code and stripped to make it more simple. I added a LED on pin 11 to light up (to let me know when my Arduino was running) and a delay(1500).</p>
<p>Be sure to add you API Key, and the URL of your INPUT FEED!</p>
<p><em>import processing.serial.*;<br />
import cc.arduino.*;<br />
import eeml.*;<br />
import pachuino.*;</em></p>
<p><em>Pachuino p;<br />
Arduino arduino;<br />
int ledPin = 11;</em></p>
<p><em>void setup(){<br />
p = new Pachuino(this, Arduino.list()[0], 115200);<br />
p.manualUpdate(&#8220;http://www.pachube.com/api/2145.xml&#8221;); // change URL &#8212; this is the feed you want to update<br />
p.setKey(&#8220;&#8212;YOUR API KEY HERE&#8212;&#8221;);</em></p>
<p><em>// local sensors<br />
p.addLocalSensor(&#8220;analog&#8221;, 0,&#8221;Light Sensor Inside&#8221;);<br />
p.addLocalSensor(&#8220;analog&#8221;, 1,&#8221;Light Sensor Outside&#8221;);<br />
}</em></p>
<p><em>void draw(){<br />
//p.debug();<br />
p.digitalWrite(ledPin, Arduino.HIGH);<br />
delay(1500);<br />
}</em></p>
<p><em>// you don&#8217;t need to change any of these</em></p>
<p><em>void onReceiveEEML(DataIn d){<br />
p.updateRemoteSensors(d);<br />
}</em></p>
<p><strong>STEP SIX: </strong><em>LAUNCH CODE AND COLLECT DATA!</em></p>
<p>Make sure that:</p>
<ul>
<li>Sensors are <em>*working*</em> and connected to Arduino</li>
<li>Arduino is running &#8220;Standard Firmata&#8221; and connected to computer</li>
<li>Processing is collecting sensor data from Arduino</li>
<li>Computer has Internet connection</li>
</ul>
<p>Now run your program and begin collecting data and sharing it on the web!!  Check your feed to make sure you data is being transmitted.  Have fun and happy tinkering!</p>
<p>&#8211;Morgellon OUT!</p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/616/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Arduino + Pachube = Web Connected Sensors!</title>
		<link>http://dailyduino.com/archives/592</link>
		<comments>http://dailyduino.com/archives/592#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:37:13 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Displays]]></category>
		<category><![CDATA[Optical]]></category>
		<category><![CDATA[Pachube]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Based]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=592</guid>
		<description><![CDATA[Quick update before I zonk out&#8230;  Yesterday I setup an account for Pachube and spent all night getting familiar with how it works. Pachube describes itself as a service that enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world. The key aim is to [...]]]></description>
			<content:encoded><![CDATA[<p>Quick update before I zonk out&#8230;  Yesterday I setup an account for <a title="http://www.pachube.com/" href="http://www.pachube.com/" target="_blank">Pachube</a> and spent all night getting familiar with how it works. Pachube describes itself as a service that enables you to connect, tag and share real time sensor data from objects, devices, buildings and environments around the world. The key aim is to facilitate interaction between remote environments, both physical and virtual.</p>
<p>It also works with Arduino and Processing&#8230; hrmmmmm&#8230;..</p>
<div>As a &#8220;test&#8221; project, I set up two light sensors in my room.  One is mounted on the wall, the other is taped to the window facing outside.  The idea is to compare inside light levels to outside light levels and adjust for energy consumption.  If the light level outside is equal or greater than inside, then perhaps I should open the blinds to let in more light&#8230; or maybe even go outside&#8230; <em><strong>*gasp</strong></em>*</div>
<div>The two light sensors are connected to an Arduino running the Standard Firmata.  The Arduino is connected to a PC running a Processing sketch that sends the sensor data to Pachube.  Nice and easy!  I&#8217;ll post more details, code and a basic tutorial later&#8230; after I&#8217;ve slept&#8230; that way it <em><strong>*might*</strong></em> make sense.</div>
<div>Until then, here are some pictures and graphs. (yay graphs!) The two graphs are generated by Pachube and are fairly easy to customize.  The higher the number, the less light is present.  So, hopefully the Inside Light Sensor will stay a nice high number as I sleep&#8230; while the Outside Light Sensor should lower over the course of the day.</div>
<div>
<a href='http://dailyduino.com/archives/592/2009-06-24-065401' title='2009-06-24-065401'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-24-065401-150x150.jpg" class="attachment-thumbnail" alt="Arduino Light Sensor Wiring" title="2009-06-24-065401" /></a>
<a href='http://dailyduino.com/archives/592/2009-06-24-065230' title='2009-06-24-065230'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-24-065230-150x150.jpg" class="attachment-thumbnail" alt="Light Sensors in Room" title="2009-06-24-065230" /></a>
<a href='http://dailyduino.com/archives/592/2009-06-24-065118' title='2009-06-24-065118'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-24-065118-150x150.jpg" class="attachment-thumbnail" alt="Inside Light Sensor" title="2009-06-24-065118" /></a>
<a href='http://dailyduino.com/archives/592/2009-06-24-065254' title='2009-06-24-065254'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-24-065254-150x150.jpg" class="attachment-thumbnail" alt="Outside Light Sensor" title="2009-06-24-065254" /></a>
<a href='http://dailyduino.com/archives/592/2009-06-24-070307' title='2009-06-24-070307'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-24-070307-150x150.jpg" class="attachment-thumbnail" alt="Outside Light Sensor" title="2009-06-24-070307" /></a>
<a href='http://dailyduino.com/archives/592/2009-06-24-070403' title='2009-06-24-070403'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-24-070403-150x150.jpg" class="attachment-thumbnail" alt="Sunrise" title="2009-06-24-070403" /></a>
<a href='http://dailyduino.com/archives/592/2009-06-24-070102' title='2009-06-24-070102'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-24-070102-150x150.jpg" class="attachment-thumbnail" alt="&quot;Screen Shot&quot;" title="2009-06-24-070102" /></a>
</div>
<p><img class="alignnone" title="INSIDE Light Sensor" src=" http://www.pachube.com/feeds/2145/datastreams/0/history.png?w=500&amp;h=200&amp;c=33cc66&amp;b=true&amp;g=true&amp;t=Inside%20Light%20Sensor&amp;l=Higher%20Numbers%20Equal%20Dark%20---%20Lower%20Numbers%20Equal%20Light&amp;s=2" alt="" width="500" height="200" /></p>
<p><img class="alignnone" title="Outside Light Sensor" src=" http://www.pachube.com/feeds/2145/datastreams/1/history.png?w=500&amp;h=200&amp;c=33cc66&amp;b=true&amp;g=true&amp;t=Outside%20Light%20Sensor&amp;l=Higher%20Numbers%20Equal%20Dark%20---%20Lower%20Numbers%20Equal%20Light&amp;s=2" alt="" width="500" height="200" /></p>
<p>The graphs will continue to update as they receive more data from the sensors.  It will be interesting to watch and compare the differences in the two graphs.  More to come soon!</p>
<p>&#8211;Morgellon OUT!!</p>
<p><code><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/592/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yarn &amp; Code&#8230;?!</title>
		<link>http://dailyduino.com/archives/565</link>
		<comments>http://dailyduino.com/archives/565#comments</comments>
		<pubDate>Wed, 17 Jun 2009 11:36:04 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=565</guid>
		<description><![CDATA[That&#8217;s right, we are still alive!  I can&#8217;t stand the pain of not posting any longer, so I thought I would make the time to do a brief update. Things have been quite action packed and distracting for me!  A recent move has not helped with the distraction factor either, lol. Between work, packing and [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right, we are still alive!  I can&#8217;t stand the pain of not posting any longer, so I thought I would make the time to do a brief update.</p>
<p>Things have been quite action packed and distracting for me!  A recent move has not helped with the distraction factor either, lol. Between work, packing and unpacking, here are the other things I&#8217;ve been doing with my time:</p>
<p><strong>Learning to Code.</strong> As I progress in my projects, my lack of coding abilities are really starting to be the limiting factor.  Among other things, I have been wanting to incorporate Processing into more projects.  In order to manifest my crazy ideas into reality, I decided to really focus on learning to &#8220;code&#8221;.   My favorite and possibly most valuable resource has been the Programming Methodology videos from Standford University.  The course is taught around Java, which is convenient for me as Processing is Java based.  Here is a link to the Programming Methodology course videos on youtube&#8230; they are also downloadable!  <a title="http://www.youtube.com/view_play_list?p=84A56BC7F4A1F852&amp;search_query=programming+methodology" href="http://www.youtube.com/view_play_list?p=84A56BC7F4A1F852&amp;search_query=programming+methodology" target="_blank">http://www.youtube.com/view_play_list?p=84A56BC7F4A1F852&amp;search_query=programming+methodology</a></p>
<p>I&#8217;ll embed the first lecture to wet your whistle!<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/KkMDCCdjyW8&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/KkMDCCdjyW8&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>Crafting.</strong> Yes, that&#8217;s correct.  <em>Crafting</em>. I&#8217;ve been wanting to do some &#8220;wearable&#8221; projects&#8230; making use of the LilyPad, conductive thread and my madness, among other things.  So, I have been learning to use a sewing machine, along with hand stitching and other techniques.  Recently, I even had the opportunity to learn to make yarn from wool.  I also have acquired a large amount of wool and a Navajo spinning spindle, to spin the wool into yarn.  One of the things I would like to try is spinning my own &#8220;conductive yarn&#8221;.</p>

<a href='http://dailyduino.com/archives/565/2009-06-17-021410' title='2009-06-17-021410'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-17-021410-150x150.jpg" class="attachment-thumbnail" alt="Wool &amp; Spindle" title="2009-06-17-021410" /></a>
<a href='http://dailyduino.com/archives/565/2009-06-17-021455' title='2009-06-17-021455'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-17-021455-150x150.jpg" class="attachment-thumbnail" alt="Wool" title="2009-06-17-021455" /></a>
<a href='http://dailyduino.com/archives/565/2009-06-17-021552' title='2009-06-17-021552'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-17-021552-150x150.jpg" class="attachment-thumbnail" alt="Wool to Yarn!" title="2009-06-17-021552" /></a>
<a href='http://dailyduino.com/archives/565/2009-06-17-021722' title='2009-06-17-021722'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/06/2009-06-17-021722-150x150.jpg" class="attachment-thumbnail" alt="Yarn" title="2009-06-17-021722" /></a>

<p>If for some reason you were interested in learning more on this technique of spinning, here&#8217;s a nice link explaining the process: <a title="http://www.graftonfibers.com/navajospinning.htm" href="http://www.graftonfibers.com/navajospinning.htm" target="_blank">http://www.graftonfibers.com/navajospinning.htm</a></p>
<p>Don&#8217;t worry, things are starting to settle and slow down with me&#8230; so hopefully I soon have time to start applying my new found knowledge to some neat Arduino projects.</p>
<p>&#8211; Morgellon OUT!</p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/565/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flourish Conference 09</title>
		<link>http://dailyduino.com/archives/544</link>
		<comments>http://dailyduino.com/archives/544#comments</comments>
		<pubDate>Fri, 24 Apr 2009 09:31:55 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Cons]]></category>
		<category><![CDATA[Flourish]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=544</guid>
		<description><![CDATA[Finally gotten around to posting some pictures and video from the Flourish Conference, in Chicago IL.  Flourish was a blast, Droops and I had a wonderful time with all the great people that we met. Massimo Banzi at Flourish &#8217;09 from Morgellon on Vimeo. Processing Workshop at Flourish &#8217;09 (pt1) from Morgellon on Vimeo. Processing [...]]]></description>
			<content:encoded><![CDATA[<p>Finally gotten around to posting some pictures and video from the Flourish Conference, in Chicago IL.  Flourish was a blast, Droops and I had a wonderful time with all the great people that we met.</p>

<a href='http://dailyduino.com/archives/544/dscn3082' title='dscn3082'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/dscn3082-150x150.jpg" class="attachment-thumbnail" alt="Flourish Conf 09" title="dscn3082" /></a>
<a href='http://dailyduino.com/archives/544/dscn3089' title='dscn3089'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/dscn3089-150x150.jpg" class="attachment-thumbnail" alt="Morgellon talks to Massimo Banzi, co-founder of the Arduino" title="dscn3089" /></a>
<a href='http://dailyduino.com/archives/544/dscn30911' title='dscn30911'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/dscn30911-150x150.jpg" class="attachment-thumbnail" alt="Morgellon with Ben Fry, a developer of Processing" title="dscn30911" /></a>

<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=4039467&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=4039467&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<a href="http://vimeo.com/4039467">Massimo Banzi at Flourish &#8217;09</a> from <a href="http://vimeo.com/morgellon">Morgellon</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=4039958&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=4039958&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<a href="http://vimeo.com/4039958">Processing Workshop at Flourish &#8217;09 (pt1)</a> from <a href="http://vimeo.com/morgellon">Morgellon</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=4040702&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=4040702&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<a href="http://vimeo.com/4040702">Processing Workshop at Flourish &#8217;09 (pt2)</a> from <a href="http://vimeo.com/morgellon">Morgellon</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/544/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Processing to Arduino Communications</title>
		<link>http://dailyduino.com/archives/483</link>
		<comments>http://dailyduino.com/archives/483#comments</comments>
		<pubDate>Fri, 20 Feb 2009 18:45:18 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[Serial]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=483</guid>
		<description><![CDATA[Finally sat down and figured out how to send some basic signals via serial from Processing to an Arduino.  For this example I was just looking for basic functionality, so I settled for a simple way to turn a LED on and off.  It&#8217;s also mostly sample code gathered from the Internet. The Processing code [...]]]></description>
			<content:encoded><![CDATA[<p>Finally sat down and figured out how to send some basic signals via serial from Processing to an Arduino.  For this example I was just looking for basic functionality, so I settled for a simple way to turn a LED on and off.  It&#8217;s also mostly sample code gathered from the Internet.</p>
<p>The Processing code creates a small black square on the screen.  When the mouse cursor is moved over the square, it changes color to yellow and sends a &#8220;H&#8221; over serial to the Arduino.  While the Arduino detects a &#8220;H&#8221; on serial it will light the LED.</p>
<p>Here&#8217;s a video of it in action and describing how to get started.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3297670&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=3297670&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<a href="http://vimeo.com/3297670">Basic Processing to Arduino Communications</a> from <a href="http://vimeo.com/morgellon">Morgellon</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<ul>
<li style="text-align: center;"><strong>Download Processing</strong></li>
</ul>
<p style="text-align: center;"><a title="http://processing.org/download/index.html" href="http://processing.org/download/index.html" target="_blank">http://processing.org/download/index.html<br />
</a></p>
<ul>
<li style="text-align: center;"><strong>Download Arduino to Processing Library</strong></li>
</ul>
<p style="text-align: center;"><a title="http://www.arduino.cc/playground/Interfacing/Processing" href="http://www.arduino.cc/playground/Interfacing/Processing" target="_blank">http://www.arduino.cc/playground/Interfacing/Processing</a></p>
<p style="text-align: left;">Now that you&#8217;ve gotten all the files installed and in their proper places, try out my test code I used in the video.</p>
<p style="text-align: center;"><strong>Arduino Code</strong><em> (Download <a title="http://serverwillprovide.com/icuubi/examples/processing/AP_lightBlink.tar" href="http://serverwillprovide.com/icuubi/examples/processing/AP_lightBlink.tar" target="_blank">here</a>)</em></p>
<p style="text-align: left;"><em>//  Read data from the serial port and turn ON or OFF a light depending on the value</em></p>
<p><em>char val;         //Data received from the serial port<br />
int ledPin = 13;  //Set value ledPin to pin 13</em></p>
<p><em>void setup(){<br />
pinMode(ledPin, OUTPUT);  //Sets pin as OUTPUT<br />
Serial.begin(9600);    //Start serial communication at 9600bps<br />
}</em></p>
<p><em>void loop(){<br />
if (Serial.available()){  //If data is available to read,<br />
val = Serial.read();    //read it and store it as val<br />
}<br />
if (val == &#8216;H&#8217;){              //If H is recieved<br />
digitalWrite(ledPin, HIGH);  //turn ON light<br />
} else {<br />
digitalWrite(ledPin, LOW);  //If not leave light OFF<br />
}<br />
delay(25);<br />
}</em></p>
<p style="text-align: center;"><strong>Processing Code</strong><em>(Download <a title="http://serverwillprovide.com/icuubi/examples/processing/PA_lightBlink.tar" href="http://serverwillprovide.com/icuubi/examples/processing/PA_lightBlink.tar" target="_blank">here</a>)</em></p>
<p style="text-align: left;"><em>//Check if the mouse is over a rectangle and write the status to the serial port<br />
</em></p>
<p style="text-align: left;"><em>import processing.serial.*;<br />
import cc.arduino.*;</em></p>
<p style="text-align: left;"><em></em><br />
<em>Serial port;    //Create object from Serial class</em></p>
<p><em>void setup() {<br />
size(200, 200);<br />
noStroke();<br />
frameRate(10);<br />
//Open the port that the board is connected to and use the same speed (9600bps)<br />
port = new Serial(this, Serial.list()[0], 9600);<br />
}</em></p>
<p><em>void draw() {<br />
background (255);<br />
if (mouseOverRect() == true) {  //If mouse if over square<br />
fill(242, 204, 47);                    //change color<br />
port.write(&#8216;H&#8217;);              //send H to serial port<br />
} else {            //If mouse is NOT over square<br />
fill(0);          //change color<br />
port.write(&#8216;L&#8217;);  //send L to serial port<br />
}<br />
rect(50, 50, 100, 100);  //Draws the square<br />
}</em></p>
<p><em>boolean mouseOverRect() {    //Tests if mouse is over square<br />
return ((mouseX &gt;= 50) &amp;&amp; (mouseX &lt;= 150) &amp;&amp; (mouseY &gt;= 50) &amp;&amp; (mouseY &lt;= 150));<br />
}</em></p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/483/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Processing Interview</title>
		<link>http://dailyduino.com/archives/471</link>
		<comments>http://dailyduino.com/archives/471#comments</comments>
		<pubDate>Mon, 19 Jan 2009 16:03:59 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=471</guid>
		<description><![CDATA[Looks like Ben Fry and Casey Reas the creators of Processing, were recently interviewed on FLOSS Weekly! This is a nice intro into the world of Processing! If you&#8217;re looking for ways to extend your *duino projects, communicate with a PC or just have some creative fun, Processing could be for you! Be sure to [...]]]></description>
			<content:encoded><![CDATA[<p>Looks like <a rel="nofollow" href="http://benfry.com/">Ben Fry</a> and <a rel="nofollow" href="http://reas.com/">Casey Reas</a> the creators of <a rel="nofollow" href="http://www.processing.org/">Processing</a>, were recently interviewed on FLOSS Weekly! This is a nice intro into the world of Processing! If you&#8217;re looking for ways to extend your *duino projects, communicate with a PC or just have some creative fun, Processing could be for you!</p>
<p style="text-align: center;"><strong> Be sure to head over to the FLOSS Weekly site and listen to this interview!</strong></p>
<ul style="text-align: center;">
<li><a href="http://twit.tv/floss52" target="_blank">http://twit.tv/floss52</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/471/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processing color selector</title>
		<link>http://dailyduino.com/archives/233</link>
		<comments>http://dailyduino.com/archives/233#comments</comments>
		<pubDate>Thu, 16 Oct 2008 03:12:45 +0000</pubDate>
		<dc:creator>droops</dc:creator>
				<category><![CDATA[Phreaknic]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=233</guid>
		<description><![CDATA[I am working on having processing read and act on data from the ardunino, this is a simple test and code should be up soon, i am working on a code repo for Morgellon and I to share projects. Arduino / Processing Color Selector from droops on Vimeo. This is for our talk at Phreaknic, [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on having processing read and act on data from the ardunino, this is a simple test and code should be up soon, i am working on a code repo for Morgellon and I to share projects.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=1980059&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=1980059&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<a href="http://vimeo.com/1980059?pg=embed&amp;sec=1980059">Arduino / Processing Color Selector</a> from <a href="http://vimeo.com/droops?pg=embed&amp;sec=1980059">droops</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1980059">Vimeo</a>.</p>
<p>This is for our talk at Phreaknic, the ardunio reads 3 linear pots and outputs serial data that looks like this:</p>
<p>X 56<br />
Y 67<br />
Z 10<br />
X 59<br />
Y 89<br />
Z 10</p>
<p>Processing takes this, splits it up, and makes the pretty colors.</p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/233/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processing is Crazy</title>
		<link>http://dailyduino.com/archives/224</link>
		<comments>http://dailyduino.com/archives/224#comments</comments>
		<pubDate>Wed, 08 Oct 2008 06:21:20 +0000</pubDate>
		<dc:creator>droops</dc:creator>
				<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=224</guid>
		<description><![CDATA[Metamorphosis from Glenn Marshall on Vimeo.]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=1747316&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=1747316&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object><br /><a href="http://vimeo.com/1747316?pg=embed&amp;sec=1747316">Metamorphosis</a> from <a href="http://vimeo.com/user656427?pg=embed&amp;sec=1747316">Glenn Marshall</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1747316">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/224/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Color Selector</title>
		<link>http://dailyduino.com/archives/169</link>
		<comments>http://dailyduino.com/archives/169#comments</comments>
		<pubDate>Tue, 30 Sep 2008 06:54:51 +0000</pubDate>
		<dc:creator>droops</dc:creator>
				<category><![CDATA[Decemilia]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=169</guid>
		<description><![CDATA[The color selector is 3 linear pots that control the rgb values of a square in a window. The window also displays the rgb values. Kinda simple to make, I reused a lot of code from the etch-a-sketch sketch. I am working on my processing book, so my projects should get better. The dot in [...]]]></description>
			<content:encoded><![CDATA[<p>The color selector is 3 linear pots that control the rgb values of a square in a window.  The window also displays the rgb values.  Kinda simple to make, I reused a lot of code from the etch-a-sketch sketch.  I am working on my processing book, so my projects should get better.</p>

<a href='http://dailyduino.com/archives/169/color1' title='color1'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/09/color1-150x150.jpg" class="attachment-thumbnail" alt="color1" title="color1" /></a>
<a href='http://dailyduino.com/archives/169/color2' title='color2'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/09/color2-150x150.jpg" class="attachment-thumbnail" alt="color2" title="color2" /></a>
<a href='http://dailyduino.com/archives/169/red' title='red'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/09/red-150x150.png" class="attachment-thumbnail" alt="red" title="red" /></a>
<a href='http://dailyduino.com/archives/169/green' title='green'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/09/green-150x150.png" class="attachment-thumbnail" alt="green" title="green" /></a>
<a href='http://dailyduino.com/archives/169/blue' title='blue'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/09/blue-150x150.png" class="attachment-thumbnail" alt="blue" title="blue" /></a>
<a href='http://dailyduino.com/archives/169/redgreen' title='redgreen'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/09/redgreen-150x150.png" class="attachment-thumbnail" alt="redgreen" title="redgreen" /></a>
<a href='http://dailyduino.com/archives/169/purple' title='purple'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/09/purple-150x150.png" class="attachment-thumbnail" alt="purple" title="purple" /></a>

<p>The dot in the red pick, is me not being able to use a mouse properly, the lines on the text seem to be a problem with the font I picked.</p>
<pre style="text-align: left;">/*
Color Selector

Takes 3 pots hooked up to analog 0,1,2 and uses them for the red green blue
values of a square.

Also displays the number for each color

*/

import processing.serial.*;

Serial myPort;
String inString;  // Input string from serial port:
String letter;
int number;
String numberS;
int redNum, greenNum, blueNum;

int x = 300; //somewhere around 200 or 300
int y = 300;

int lf = 10;

PFont font;

void setup() {
size(x, y);
//you may have to change the serial port
myPort = new Serial(this, Serial.list()[0], 9600);
myPort.bufferUntil(lf);

background(0);

font = loadFont("aakar-medium-20.vlw"); //make your own font

}

void draw() {

background(0);

textFont(font);

fill(255, 0, 0);
text(redNum, 10,30);

fill(0, 255, 0);
text(greenNum, 70,30);

fill(0, 0, 255);
text(blueNum, 130,30);

fill(redNum, greenNum, blueNum);
rect(0,50,x,y);

}

void serialEvent(Serial p) {
inString = (myPort.readString());

letter = inString.substring(0, 1);
numberS = inString.substring(2);
numberS = trim(numberS);
number = Integer.parseInt(numberS); //I could have combined a bit of this, but this code is for learning

if(letter.equals("R") == true) {
redNum = number;
}
if(letter.equals("G") == true) {
greenNum = number;
}
if(letter.equals("B") == true) {
blueNum = number;
}

}

/*Arduino Code

int bluePin = 2; //analog pin for right hand knob
int greenPin = 1;  //analog pin for left hand knob
int redPin = 0; //analog pin for center knob (width)

//Info for Serial Data
int id_1 = 'R';
int id_2 = 'G';
int id_3 = 'B';
int space = ' ';

void setup()
{
pinMode(redPin, INPUT);
pinMode(greenPin, INPUT);
pinMode(bluePin, INPUT);

Serial.begin(9600);
}

void loop()
{
int redNum = analogRead(redPin);
int greenNum = analogRead(greenPin);
int blueNum = analogRead(bluePin);

//the arduino will read from 0 to 1024 on teh analog pins, so we divide that by 4
redNum = redNum / 4;
greenNum = greenNum / 4;
blueNum = blueNum / 4;

printByte(id_1);
printByte(space);
printInteger(redNum);  printByte(10);

printByte(id_2);
printByte(space);
printInteger(greenNum);  printByte(10);

printByte(id_3);
printByte(space);
printInteger(blueNum);  printByte(10);

delay(10);

}

*/</pre>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/169/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poorman&#8217;s Oscilloscope Improved</title>
		<link>http://dailyduino.com/archives/116</link>
		<comments>http://dailyduino.com/archives/116#comments</comments>
		<pubDate>Mon, 15 Sep 2008 16:07:38 +0000</pubDate>
		<dc:creator>droops</dc:creator>
				<category><![CDATA[Processing]]></category>
		<category><![CDATA[oscilloscope]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=116</guid>
		<description><![CDATA[Many of ya&#8217;ll have seen this really cool hack of an oscilloscope built with an Arduino and Processing. http://accrochages.drone.ws/en/node/90 I have been playing with it a bit and have added some functionality to it. It now supports up to 3 inputs, 6 if i add a bit of code, has a second counter since the [...]]]></description>
			<content:encoded><![CDATA[<p>Many of ya&#8217;ll have seen this really cool hack of an oscilloscope built with an Arduino and Processing.</p>
<p><a href="http://accrochages.drone.ws/en/node/90">http://accrochages.drone.ws/en/node/90</a></p>
<p><img src="http://www.bnkk.net/images/o_scope.jpg" alt="Example Screenshot" /></p>
<p>I have been playing with it a bit and have added some functionality to it.  It now supports up to 3 inputs, 6 if i add a bit of code, has a second counter since the application (applet) started, and has lines across the screen for a bit of &#8220;what the heck value is this, zen&#8221;.</p>
<p>Here are a few screenshots of my additions to keep you interested, we will be talking more about this at Phreaknic hopefully.  Code and such will be up soon, its a bit dirty and I want to add a few more things.  Maybe Morgellon will bring his scope to Phreaknic and I can see what one actually does.</p>
<p><a href="http://dailyduino.com/wp-content/uploads/2008/09/scope.png"><img class="alignnone size-medium wp-image-117" title="scope" src="http://dailyduino.com/wp-content/uploads/2008/09/scope-300x182.png" alt="" width="300" height="182" /></a><a href="http://dailyduino.com/wp-content/uploads/2008/09/scope2.png"><img class="alignnone size-medium wp-image-118" title="scope2" src="http://dailyduino.com/wp-content/uploads/2008/09/scope2-300x182.png" alt="" width="300" height="182" /></a></p>
<p><a href="http://dailyduino.com/wp-content/uploads/2008/09/scope2.png"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/116/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

