<?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>digital things and physical computing &#187; processing</title>
	<atom:link href="http://ericholm.nl/blog/tag/processing/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericholm.nl/blog</link>
	<description>things, tinkering and thougths by eric</description>
	<lastBuildDate>Fri, 04 Jun 2010 14:58:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Liquid tester</title>
		<link>http://ericholm.nl/blog/2009/08/liquid-tester/</link>
		<comments>http://ericholm.nl/blog/2009/08/liquid-tester/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 16:04:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[campusparty09]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://ericholm.nl/blog/?p=146</guid>
		<description><![CDATA[At the &#8216;Campus Party&#8216; in Valencia I gave an Arduino introduction workshop, and there were some very good results. Juan Ferrer and Jorge Cases built a liquid tester, with only two wires and a resistor, which can measure the resistance of a liquid. Because every liquid has a different resistance you can separate different drinks [...]]]></description>
			<content:encoded><![CDATA[<p>At the &#8216;<a href="http://campus-party.es">Campus Party</a>&#8216; in Valencia I gave an Arduino introduction workshop, and there were some very good results.</p>
<p>Juan Ferrer and Jorge Cases built a liquid tester, with only two wires and a resistor, which can measure the resistance of a liquid. Because every liquid has a different resistance you can separate different drinks like water or orange juice. With some <a href="http://processing.org">Processing</a> <a href="wp-content/uploads/2009/08/liquidtestProcessing.zip">code</a> you can do something nice with those values.</p>
<p><object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/FsKtga3V3DE&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FsKtga3V3DE&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></p>
<p><strong>How to make your own liquid tester:</strong><br />
You need an Arduino, some wires and a 10K resistor.<br />
Upload the standardFirmata to the Arduino, read <a href="http://www.arduino.cc/playground/Interfacing/Processing">this</a> for more info.<br />
<span id="more-146"></span><br />
<img src="http://ericholm.nl/blog/wp-content/uploads/2009/08/liquid-test-150x150.jpg" alt="liquid tester" title="liquid tester" width="150" height="150" class="alignnone size-thumbnail wp-image-149" /></p>
<pre class="brush: cpp; title: ;">
// Detector de Liquidos (Liquid Detector)
// By Juan Ferrer and Jorge Cases
// open this file in Processing and upload the Standard Firmata to your Arduino
// connect the wires to the analog input port number 0

import processing.serial.*;
import cc.arduino.*;

Arduino arduino;

color off = color(4, 79, 111);
color on = color(84, 145, 158);

color blueColor = color(0,0,250);
color orangeColor = color(255,128,0);

int heightVal = 280;
int widthVal = 470;
int adjust = 20;
PFont fontA;

void drawGraph() {
  line(adjust,adjust,adjust,heightVal-(adjust*2));
  line(adjust,heightVal-(adjust*2),widthVal-(adjust*2),heightVal-(adjust*2));
}

void setup() {
  size(widthVal, heightVal);
  arduino = new Arduino(this, Arduino.list()[0], 115200);
  fontA = loadFont(&quot;CourierNew36.vlw&quot;);
  textFont(fontA, 32);
}

void draw() {
  background(off);
  stroke(on);

  drawGraph();
  int value = arduino.analogRead(0);

  if (value &lt; 980 &amp;&amp; value &gt; 900) {
    fill(blueColor);
    text(&quot;this is water&quot;, 200, 90);
  } else if (value&lt;800 &amp;&amp; value &gt; 700) {
    fill(orangeColor);
    text(&quot;this is orange juice&quot;, 200, 90);
  }
  else {
    fill(off);
    text(&quot;&quot;, 200, 90);
  }
  println(value);
  rect(adjust,heightVal-(adjust*2),50,-(heightVal-(adjust*2))*value/1024);
  delay(500);
}
</pre>
<p><a href="http://ericholm.nl/blog/wp-content/uploads/2009/08/liquidtestProcessing.zip">download processing.org code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericholm.nl/blog/2009/08/liquid-tester/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Who&#8217;s at the office Twitter script</title>
		<link>http://ericholm.nl/blog/2009/05/whos-at-the-office-twitter-script/</link>
		<comments>http://ericholm.nl/blog/2009/05/whos-at-the-office-twitter-script/#comments</comments>
		<pubDate>Sun, 24 May 2009 11:34:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[physical computing]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://ericholm.nl/blog/?p=44</guid>
		<description><![CDATA[Use this script if you always wanted to now at which time your colleagues enter and leave the office. What does it do? It will scan the local network every minute for predefined computernames. If this returns a true than the computer is switched on and the colleague is probably at the office and it [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ericholm.nl/blog/wp-content/uploads/2009/05/whoisattheoffice.jpg" alt="whoisattheoffice" title="whoisattheoffice" width="500" height="200" class="alignnone size-full wp-image-45" /></p>
<p><strong><em>Use this script if you always wanted to now at which time your colleagues enter and leave the office.</em></strong></p>
<p></p>
<h3>What does it do?</h3>
<p>It will scan the local network every minute for predefined computernames. If this returns a true than the computer is switched on and the colleague is probably at the office and it will send &#8216;John Doe has entered the office&#8217; to a Twitter page.</p>
<p></p>
<h3>How can I use it</h3>
<p>Currently the script is only tested on Mac OS, it shouldn&#8217;t be so hard to convert it to a script that is working under Windows, &#8216;nmblookup&#8217; should be replaced with &#8216;ping&#8217;. Please leave a comment at this page if you have this script working in Windows.</p>
<p></p>
<h3>Source files:</h3>
<p><a href="http://ericholm.nl/blog/wp-content/uploads/2009/05/whoisattheoffice-twitter.zip">» Download Processing code + PHP source files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericholm.nl/blog/2009/05/whos-at-the-office-twitter-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

