<?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; Sensors</title>
	<atom:link href="http://dailyduino.com/archives/category/sensors/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>DS18B20 Temperature Sensors and Arduino</title>
		<link>http://dailyduino.com/archives/552</link>
		<comments>http://dailyduino.com/archives/552#comments</comments>
		<pubDate>Tue, 28 Apr 2009 07:32:55 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Temperature]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=552</guid>
		<description><![CDATA[Spent the day working with DS18B20 temperature sensors and getting an Arduino to read the data they spit out.  Lucky for me and you, we have the shoulders of giants to stand upon as we copy and paste some magical code to get us started! DS18B20 Temperature Sensors + Arduino from Morgellon on Vimeo. The [...]]]></description>
			<content:encoded><![CDATA[<p>Spent the day working with DS18B20 temperature sensors and getting an Arduino to read the data they spit out.  Lucky for me and you, we have the shoulders of giants to stand upon as we copy and paste some magical code to get us started!</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=4370075&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=4370075&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/4370075">DS18B20 Temperature Sensors + Arduino</a> from <a href="http://vimeo.com/morgellon">Morgellon</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>The DS18B20 is a small 3 pin temperature sensor that closely resembles a transistor.  Each one has a &#8220;unique&#8221; 64bit serial code and can communicate over a &#8220;1 Wire&#8221; protocol.   With a bit of code, we can have multiple temperature sensors all communicating and sending data over just <strong>one</strong> pin!</p>
<p>I&#8217;ve taken some pictures of my project today.  I have three DS18B20 all communicating over pin 10 on an Arduino.</p>

<a href='http://dailyduino.com/archives/552/attachment/1240890896474' title='1240890896474'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/1240890896474-150x150.jpg" class="attachment-thumbnail" alt="DS18B20 Temperature Sensor and Arduino" title="1240890896474" /></a>
<a href='http://dailyduino.com/archives/552/attachment/1240890912331' title='1240890912331'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/1240890912331-150x150.jpg" class="attachment-thumbnail" alt="DS18B20 Temperature Sensor and Arduino" title="1240890912331" /></a>
<a href='http://dailyduino.com/archives/552/attachment/1240890955890' title='1240890955890'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/1240890955890-150x150.jpg" class="attachment-thumbnail" alt="DS18B20 Temperature Sensors and Arduino" title="1240890955890" /></a>
<a href='http://dailyduino.com/archives/552/attachment/1240891013416' title='1240891013416'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/1240891013416-150x150.jpg" class="attachment-thumbnail" alt="DS18B20 Temperature Sensors and Arduino" title="1240891013416" /></a>
<a href='http://dailyduino.com/archives/552/attachment/1240891036353' title='1240891036353'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/1240891036353-150x150.jpg" class="attachment-thumbnail" alt="DS18B20 Temperature Sensors" title="1240891036353" /></a>
<a href='http://dailyduino.com/archives/552/attachment/1240892195639' title='1240892195639'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2009/04/1240892195639-150x150.jpg" class="attachment-thumbnail" alt="&quot;Screen Shot&quot;" title="1240892195639" /></a>

<p>The first, or closest to the Arduino, is wired in &#8220;Normal&#8221; or &#8220;Master&#8221; mode.</p>
<ul>
<li>GND(pin1) to Arduino GND</li>
<li>DQ(pin2) to Arduino Pin 10</li>
<li>VDD(pin3) to Arduino 5V</li>
<li>a 4.7K Resistor between DQ(pin2) and VDD(pin3)</li>
</ul>
<p>The last two, or middle and furthest away from the Arduino are wired in &#8220;Parasitic&#8221; or &#8220;Slave&#8221; mode.  These two require no power (as their name sake implies).</p>
<ul>
<li>GND(pin1) and VDD(pin3) to Arduino GND</li>
<li>DQ(pin2) to Arduino Pin 10</li>
</ul>
<p>The bit of sample code scans through the DS18B20 64bit serial codes until it finds no more unique codes.  It displays the information in HEX, followed by Celsius, then Fahrenheit of each sensor before moving to the next.</p>
<p>Download the code used in the example here:  <a title="DS18B20 code!  here we go!!" href="http://serverwillprovide.com/icuubi/examples/multiDS18B20.pde" target="_blank">http://serverwillprovide.com/icuubi/examples/multiDS18B20.pde</a></p>
<p style="text-align: center;">Read more about the DS18B20 Temperature Sensors and the Arduino!</p>
<ul>
<li style="text-align: center;"><a title="This will get us started with the things we need to know!" href="# http://www.arduino.cc/playground/Learning/OneWire" target="_self">http://www.arduino.cc/playground/Learning/OneWire</a></li>
<li style="text-align: center;"><a title="The nitty gritty details... DS18B20 datasheet" href="# http://datasheets.maxim-ic.com/en/ds/DS18S20.pdf" target="_blank">http://datasheets.maxim-ic.com/en/ds/DS18S20.pdf</a></li>
<li style="text-align: center;"><a title="Arduinoforum post about DS18B20... good stuff!" href="# http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1161557194/75" target="_blank">http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1161557194/75</a></li>
<li style="text-align: center;"><a title="Arduinoforum post about DS18B20... good stuff!" href="# http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1199313338/0" target="_blank">http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1199313338/0</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/552/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>RepRap Goodness!</title>
		<link>http://dailyduino.com/archives/508</link>
		<comments>http://dailyduino.com/archives/508#comments</comments>
		<pubDate>Sun, 15 Mar 2009 19:22:14 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Communication]]></category>
		<category><![CDATA[Freeduino]]></category>
		<category><![CDATA[Mcwire]]></category>
		<category><![CDATA[RepRap]]></category>
		<category><![CDATA[RepStrap]]></category>
		<category><![CDATA[Sanguino]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=508</guid>
		<description><![CDATA[So, I like to lurk in the #arduino IRC chatroom on freenode.net.  While in there the other day I started talking with Graxe and he mentioned that he would be near my area and inquired if I was interested in the RepRap.  Needless to say, I didn&#8217;t hesitate on arranging a meet-up! So, Graxe was [...]]]></description>
			<content:encoded><![CDATA[<p>So, I like to lurk in the #arduino IRC chatroom on freenode.net.  While in there the other day I started talking with Graxe and he mentioned that he would be near my area and inquired if I was interested in the RepRap.  Needless to say, I didn&#8217;t hesitate on arranging a meet-up!</p>
<p>So, Graxe was kind enough to drive down and share all his <em><strong>awesome</strong></em> gear with me.  I decided to take a bit of video last night, as he was unpacking.  The video is a little dark, as it was an impromptu session.  The battery was almost dead, so the video cuts out near the end.</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=3661111&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=3661111&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/3661111">Adventures in RepRap Land</a> from <a href="http://vimeo.com/morgellon">Morgellon</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Fear not&#8230; after a trip to the Chinese buffet, we plan to return and do more electronics work.  We also plan on taking some more video and pictures&#8230; hopefully a little better quality this time around <img src='http://dailyduino.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/508/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Drum Kit!</title>
		<link>http://dailyduino.com/archives/226</link>
		<comments>http://dailyduino.com/archives/226#comments</comments>
		<pubDate>Sat, 11 Oct 2008 21:01:34 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Phreaknic]]></category>
		<category><![CDATA[Piezo]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=226</guid>
		<description><![CDATA[So here&#8217; s my little version of the drum kit.  I&#8217;ve just used sample code from arduino.cc, but it&#8217;s more than enough to get the project up and running.  Expect to see it evolve over time, and if you plan on being at Phreaknic you can play with it there! Arduino Knock Sensor Drum Kit [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">So here&#8217; s my little version of the drum kit.  I&#8217;ve just used sample code from <a title="Arduino Tutorial" href="http://arduino.cc/en/Tutorial/HomePage" target="_blank">arduino.cc</a>, but it&#8217;s more than enough to get the project up and running.  Expect to see it evolve over time, and if you plan on being at Phreaknic you can play with it there!</p>
<p style="text-align: center;">
<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=1940394&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=1940394&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="225"></embed></object><br /><a href="http://vimeo.com/1940394?pg=embed&amp;sec=1940394">Arduino Knock Sensor Drum Kit v1.01</a> from <a href="http://vimeo.com/morgellon?pg=embed&amp;sec=1940394">Morgellon</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1940394">Vimeo</a>.</p>
<p style="text-align: center;">
<ul style="text-align: center;">
<li style="text-align: center;"><strong>Read how to use a piezo buzzer as a knock sensor</strong></li>
</ul>
<p style="text-align: center;"><a href="http://arduino.cc/en/Tutorial/Knock" target="_blank">http://arduino.cc/en/Tutorial/Knock</a></p>
<ul style="text-align: center;">
<li style="text-align: center;"><strong>Read how to make a piezo buzzer play various tones, instead of just one!</strong></li>
</ul>
<p style="text-align: center;"><a href="http://arduino.cc/en/Tutorial/PlayMelody">http://arduino.cc/en/Tutorial/PlayMelody</a></p>
<p style="text-align: left;"><em>Here&#8217;s the sample code I used, with a few tweaks added:</em></p>
<p style="text-align: left;">int ledPin = 13;      // led connected to control pin 13<br />
int knockSensor = 0;  // the knock sensor will be plugged at analog pin 0<br />
byte val = 0;         // variable to store the value read from the sensor pin<br />
int statePin = LOW;   // variable used to store the last LED status, to toggle the light<br />
int THRESHOLD = 100;  // threshold value to decide when the detected sound is a knock or not</p>
<p>// TONES  ==========================================<br />
// Start by defining the relationship between<br />
//       note, period, &amp;  frequency.<br />
#define  c     3830    // 261 Hz<br />
#define  d     3400    // 294 Hz<br />
#define  e     3038    // 329 Hz<br />
#define  f     2864    // 349 Hz<br />
#define  g     2550    // 392 Hz<br />
#define  a     2272    // 440 Hz<br />
#define  b     2028    // 493 Hz<br />
#define  C     1912    // 523 Hz<br />
// Define a special note, &#8216;R&#8217;, to represent a rest<br />
#define  R     0</p>
<p>// SETUP ============================================<br />
// Set up speaker on a PWM pin (digital 9, 10 or 11)<br />
int speakerOut = 9;<br />
// Do we want debugging on serial out? 1 for yes, 0 for no<br />
int DEBUG = 1;</p>
<p>void setup() {<br />
pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT<br />
pinMode(speakerOut, OUTPUT);<br />
Serial.begin(9600);       // use the serial port<br />
}</p>
<p>// MELODY and TIMING  =======================================<br />
//  melody[] is an array of notes, accompanied by beats[],<br />
//  which sets each note&#8217;s relative length (higher #, longer note)<br />
int melody[] = {  C,  b,  g,  C,  b,   e,   C,  c  };<br />
int beats[]  = { 16, 16, 16,  8,  8,  16,  16, 16  };<br />
int MAX_COUNT = sizeof(melody) / 2; // Melody length, for looping.</p>
<p>// Set overall tempo<br />
long tempo = 10000;<br />
// Set length of pause between notes<br />
int pause = 1000;<br />
// Loop variable to increase Rest length<br />
int rest_count = 100; //&lt;-BLETCHEROUS HACK; See NOTES</p>
<p>// Initialize core variables<br />
int tone = 0;<br />
int beat = 0;<br />
long duration  = 0;</p>
<p>// PLAY TONE  ==============================================<br />
// Pulse the speaker to play a tone for a particular duration<br />
void playTone() {<br />
long elapsed_time = 0;<br />
if (tone &gt; 0) { // if this isn&#8217;t a Rest beat, while the tone has<br />
//  played less long than &#8216;duration&#8217;, pulse speaker HIGH and LOW<br />
while (elapsed_time &lt; duration) {</p>
<p>digitalWrite(speakerOut,HIGH);<br />
delayMicroseconds(tone / 2);</p>
<p>// DOWN<br />
digitalWrite(speakerOut, LOW);<br />
delayMicroseconds(tone / 2);</p>
<p>// Keep track of how long we pulsed<br />
elapsed_time += (tone);<br />
}<br />
}<br />
else { // Rest beat; loop times delay<br />
for (int j = 0; j &lt; rest_count; j++) { // See NOTE on rest_count<br />
delayMicroseconds(duration);<br />
}<br />
}<br />
}</p>
<p>void loop() {<br />
val = analogRead(knockSensor);    // read the sensor and store it in the variable &#8220;val&#8221;<br />
if (val &gt;= THRESHOLD) {<br />
// statePin = !statePin;           // toggle the status of the ledPin (this trick doesn&#8217;t use time cycles)<br />
digitalWrite(ledPin, HIGH); // turn the led on or off<br />
Serial.println(&#8220;Knock!&#8221;);       // send the string &#8220;Knock!&#8221; back to the computer, followed by newline<br />
for (int i=0; i&lt;MAX_COUNT; i++) {<br />
tone = melody[i];<br />
beat = beats[i];</p>
<p>duration = beat * tempo; // Set up timing</p>
<p>playTone();<br />
// A pause between notes&#8230;<br />
delayMicroseconds(pause);<br />
}<br />
delay(10);                      // short delay to avoid overloading the serial port<br />
}<br />
digitalWrite(ledPin, LOW);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/226/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drum Kit!</title>
		<link>http://dailyduino.com/archives/211</link>
		<comments>http://dailyduino.com/archives/211#comments</comments>
		<pubDate>Wed, 08 Oct 2008 04:48:38 +0000</pubDate>
		<dc:creator>droops</dc:creator>
				<category><![CDATA[Phreaknic]]></category>
		<category><![CDATA[Piezo]]></category>
		<category><![CDATA[drum]]></category>
		<category><![CDATA[knock]]></category>
		<category><![CDATA[led]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=211</guid>
		<description><![CDATA[I totally ripped this off from Morgellon, but it sounded fun and I wanted to try it. He is going to build his own version of this that I am sure is going to be cooler.  I had to call him and ask some questions as he is most definitely the hardware end of our [...]]]></description>
			<content:encoded><![CDATA[<p>I totally ripped this off from Morgellon, but it sounded fun and I wanted to try it. He is going to build his own version of this that I am sure is going to be cooler.  I had to call him and ask some questions as he is most definitely the hardware end of our crazy love triangle. I want to dump the data into processing and have it animate the drums being hit, but that is for another day.</p>
<p style="text-align: center;">
<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=1908597&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=1908597&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/1908597?pg=embed&amp;sec=1908597">Arduino Knock Sensor Drum Kit v1</a> from <a href="http://vimeo.com/user783016?pg=embed&amp;sec=1908597">droops</a> on <a href="http://vimeo.com?pg=embed&amp;sec=1908597">Vimeo</a>.
</p>
<p>When a drum is struck, a knock sensor (backwards peizo) talks to the arduino and activates an led ot change the color of the drum (blue), after a delay the blue led goes out and the drum becomes orange again.  I used a pullup resistor between the pins of the knock sensor, but i didnt get any different results with different values, so its probably dependent on the peizo that you use.</p>

<a href='http://dailyduino.com/archives/211/dsc_0331' title='dsc_0331'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/10/dsc_0331-150x150.jpg" class="attachment-thumbnail" alt="dsc_0331" title="dsc_0331" /></a>
<a href='http://dailyduino.com/archives/211/dsc_0332' title='dsc_0332'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/10/dsc_0332-150x150.jpg" class="attachment-thumbnail" alt="dsc_0332" title="dsc_0332" /></a>
<a href='http://dailyduino.com/archives/211/dsc_0333' title='dsc_0333'><img width="150" height="150" src="http://dailyduino.com/wp-content/uploads/2008/10/dsc_0333-150x150.jpg" class="attachment-thumbnail" alt="dsc_0333" title="dsc_0333" /></a>

<pre style="text-align: left;">/*
droop's drum kit

dailyduino.com

droops - gmail

thanks for the idea josh!!
*/

int knockPin = 3; //pin for incoming knock sensor
int knockVal; //value from knock sensor
int knockLedPin = 10; //bue led
int normalLedPin = 4;  //orange led
int lightBlue = 2000; //counter for keeping blue light on
int limit = 1000; //how sensitive the knock sensor is, lower = higher sensitivity based on piezo and pull down resistor
int blueTime = 2000; //how long the blue led stays on

void setup(){
  pinMode(knockLedPin, OUTPUT);
  pinMode(normalLedPin, OUTPUT);
  pinMode(knockPin, INPUT);
  Serial.begin(9600);
  digitalWrite(knockLedPin, LOW);
  digitalWrite(normalLedPin, HIGH);
}

void loop(){

  knockVal = analogRead(knockPin); //read the knock sensor

  if (knockVal &lt; limit){
    lightBlue = 0; //drop the value to activate the led
    Serial.println(knockVal);  //dump to serial for debugging
  }

  //this keeps the blue light on after a knock is registered
  if(lightBlue &lt; blueTime){
    digitalWrite(normalLedPin, LOW);
    digitalWrite(knockLedPin, HIGH);
    lightBlue++;
  } else {
    digitalWrite(knockLedPin, LOW);
    digitalWrite(normalLedPin, HIGH);
  }  

}</pre>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/211/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sensing the Light&#8230;</title>
		<link>http://dailyduino.com/archives/198</link>
		<comments>http://dailyduino.com/archives/198#comments</comments>
		<pubDate>Sat, 04 Oct 2008 17:15:40 +0000</pubDate>
		<dc:creator>Morgellon</dc:creator>
				<category><![CDATA[Power]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Solar]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=198</guid>
		<description><![CDATA[Recently, I posted about using a solar panel as a method for charging a battery that powers the Arduino.  Although using a solar cell as a power source is the most obvious use, it is not the only use! I found a post over at little-scale that shows how to use a solar cell with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dailyduino.com/wp-content/uploads/2008/10/solarsensing.jpg"><img class="size-medium wp-image-199 alignright" title="solarsensing" src="http://dailyduino.com/wp-content/uploads/2008/10/solarsensing-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Recently, I posted about using a solar panel as a method for charging a battery that powers the Arduino.  Although using a solar cell as a power source is the most obvious use, it is not the only use!</p>
<p>I found a post over at <a title="little scale blog" href="http://little-scale.blogspot.com/2008/03/connecting-solar-panel-to-arduino.html" target="_blank">little-scale</a> that shows how to use a solar cell with an Arduino as a photo sensor.  The code looks very similar to reading a pot, or other such device on an analog input.  Although, there a few caveats to doing this noted by <a href="http://little-scale.blogspot.com/2008/03/connecting-solar-panel-to-arduino.html" target="_blank">little-scale</a>:  The solar panel used in this example was rated at 2V and 25mA.<br />
• Do not use a solar panel rated in excess of 5V. Doing so may damage the Arduino<br />
• If data values appear incorrect, try scaling the byte &#8216;data&#8217; in the Arduino sketch as it is captured. The analog inputs read data at 10 bit. However, a single, serially-printed value can only hold 8 bits of information.<br />
• The data range with this particular solar panel is 0 &lt; 6 using power-efficient, indoor lighting at night.</p>
<p>The next question after <em>HOW</em> could be <em>WHY? </em>There a many different applications that spring to my mind, from practical to abstract. I am also curious if you could still use a panel as a sensor and power source, by having one trace going to the analog input, and another going to the power source.</p>
<p style="text-align: left;">I have also decided to include a few examples from practical to abstract, to get <strong>your</strong> thoughts flowing on this subject.  The first example is a &#8220;practical&#8221; one from youtube user, <a title="ringsofdeath's Channel" href="http://www.youtube.com/user/ringsofdeath" target="_blank">ringsofdeath</a>.  The second is a more &#8220;abstract&#8221; one from youtube user, <a title="5imian's Channel" href="http://www.youtube.com/user/5imian">5imian</a>.  I hope you enjoy the videos and they get the juices flowing!</p>
<p style="text-align: center;"><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="src" value="http://www.youtube.com/v/oThoa_zHTkk&amp;hl=en&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/oThoa_zHTkk&amp;hl=en&amp;fs=1" allowfullscreen="true"></embed></object></p>
<p style="text-align: center;"><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="src" value="http://www.youtube.com/v/L5iPpLnZeyU&amp;hl=en&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/L5iPpLnZeyU&amp;hl=en&amp;fs=1" allowfullscreen="true"></embed></object></p>
<ul>
<li style="text-align: center;"><strong>Read the blog post at Little-Scale on &#8220;solar sensing&#8221;</strong></li>
</ul>
<p style="text-align: center;"><a href="http://little-scale.blogspot.com/2008/03/connecting-solar-panel-to-arduino.html" target="_blank">http://little-scale.blogspot.com/2008/03/connecting-solar-panel-to-arduino.html</a></p>
<ul>
<li style="text-align: center;"><strong>View a &#8220;practical&#8221; example of solar sensing on YouTube</strong></li>
</ul>
<p style="text-align: center;"><a href="http://www.youtube.com/watch?v=oThoa_zHTkk&amp;NR=1" target="_blank">http://www.youtube.com/watch?v=oThoa_zHTkk&amp;NR=1</a></p>
<ul>
<li style="text-align: center;"><strong>View an &#8220;abstract&#8221; example of solar sensing on YouTube</strong></li>
</ul>
<p style="text-align: center;"><a href="http://www.youtube.com/watch?v=L5iPpLnZeyU" target="_blank">http://www.youtube.com/watch?v=L5iPpLnZeyU</a><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/198/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slotted Optical Sensors</title>
		<link>http://dailyduino.com/archives/91</link>
		<comments>http://dailyduino.com/archives/91#comments</comments>
		<pubDate>Thu, 04 Sep 2008 04:39:50 +0000</pubDate>
		<dc:creator>droops</dc:creator>
				<category><![CDATA[Freeduino]]></category>
		<category><![CDATA[Optical]]></category>
		<category><![CDATA[breadboard]]></category>
		<category><![CDATA[infrared]]></category>
		<category><![CDATA[nkc]]></category>
		<category><![CDATA[proto]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=91</guid>
		<description><![CDATA[After watching Citizen Engineer, I wanted to play with a slotted optical sensor, well that and a payphone, a sim card reader, a little vice and other cool electronics things. So I ordered a few from All Electronics. As usual, I had no idea how these things work, so I started plugging in wires and [...]]]></description>
			<content:encoded><![CDATA[<p>After watching <a href="http://www.citizenengineer.com/">Citizen Engineer</a>, I wanted to play with a slotted optical sensor, well that and a payphone, a sim card reader, a little vice and other cool electronics things.  So I ordered a few from <a href="http://www.allelectronics.com/make-a-store/item/OSU-57/SLOTTED-OPTO-SENSOR/1.html">All Electronics</a>.</p>
<p>As usual, I had no idea how these things work, so I started plugging in wires and using a standard analog input sketch.  That did not work at all, after I heard something pop I knew I was not on the right track. Then I started looking for some help. I still have not found a datasheet, but I found a graphic that made things work for me.  My exact model is the OPB3902.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://csel.cs.colorado.edu/~bauerk/legorobots/images/assembly/img46.gif" alt="Optical Sensor Schematic" /></p>
<p>There are four pins on the bottom of these things, two to work the emitter (E) (pins 1 and 3) and two for the detector (D) (pins 2 and 4).  Two resistors are needed, a 330 Ohm (orange orange red) and 2.2 K (red red orange).</p>
<p>I mounted the Optical Sensor on a proto board, having carefully cut off the plastic bump on the bottom of the sensor.  I also used a led with a 1K (brown black red) for signaling when something was activating the switch.  According to the drawing 5 volts would work, so that&#8217;s what I used, along with analog pin 2 for input and digital pin 12 for the signaling led.</p>
<p>After running my sketch and dumping the sensor reading to serial I found that it idled at ~929 and when the sensor was activated it was ~1020.  This is great, no problem to see a change of state, so I wrote a bit more code to activate the led.  I did not include a delay as I wanted the led to react quickly.</p>
<p style="text-align: center;"><a href="http://dailyduino.com/wp-content/uploads/2008/09/opt2.png"><img class="alignnone size-thumbnail wp-image-97" title="opt2" src="http://dailyduino.com/wp-content/uploads/2008/09/opt2-150x150.png" alt="" width="150" height="150" /> </a><a href="http://dailyduino.com/wp-content/uploads/2008/09/opt1.png"><img class="alignnone size-thumbnail wp-image-96" title="opt1" src="http://dailyduino.com/wp-content/uploads/2008/09/opt1-150x150.png" alt="" width="150" height="150" /></a></p>
<p style="text-align: left;">Here is my code, feel free to do with it as you will!</p>
<pre style="text-align: left;">
/*
Demo for a slotted optical sensor.

I am sure that someone elses code is in here somewhere
*/

int inputPin = 2;    // select the input pin for the potentiometer
int ledPin = 12;   // select the pin for the LED
int val = 0;       // variable to store the value coming from the sensor

void setup() {
  pinMode(inputPin, OUTPUT);  // declare the ledPin as an OUTPUT
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {

  val = analogRead(inputPin);    // read the value from the sensor
  Serial.println(val);

  if(val &gt; 950){
    digitalWrite(ledPin, HIGH);  // turn the ledPin on
  } else {
    digitalWrite(ledPin, LOW);   // turn the ledPin off
  }
}
</pre>
<p>I am very excited to know how to set up this sensor.  Next time I am going to find some with the hook up wires already soldered and heatshrinked on.  For those that are curious, that is a <a href="http://www.nkcelectronics.com/freeduino-arduino-diecimila-compatible-board-complete-kit.html">Freeduino from NKC</a> under there.</p>
<p style="text-align: center;"><a href="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0344.jpg"><img class="alignnone size-thumbnail wp-image-101" title="dsc_0344" src="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0344-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0345.jpg"><img class="alignnone size-thumbnail wp-image-102" title="dsc_0345" src="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0345-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0346.jpg"><img class="alignnone size-thumbnail wp-image-103" title="dsc_0346" src="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0346-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0347.jpg"><img class="alignnone size-thumbnail wp-image-104" title="dsc_0347" src="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0347-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0348.jpg"><img class="alignnone size-thumbnail wp-image-105" title="dsc_0348" src="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0348-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0349.jpg"><img class="alignnone size-thumbnail wp-image-106" title="dsc_0349" src="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0349-150x150.jpg" alt="" width="150" height="150" /> </a><a href="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0350.jpg"><img class="alignnone size-thumbnail wp-image-107" title="dsc_0350" src="http://dailyduino.com/wp-content/uploads/2008/09/dsc_0350-150x150.jpg" alt="" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/91/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LCD&#8217;s &#8211; Bring your projects to the next level</title>
		<link>http://dailyduino.com/archives/61</link>
		<comments>http://dailyduino.com/archives/61#comments</comments>
		<pubDate>Sat, 23 Aug 2008 17:18:20 +0000</pubDate>
		<dc:creator>droops</dc:creator>
				<category><![CDATA[LCD]]></category>
		<category><![CDATA[RFID]]></category>
		<category><![CDATA[Displays]]></category>
		<category><![CDATA[Modern Device]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[serial]]></category>

		<guid isPermaLink="false">http://dailyduino.com/?p=61</guid>
		<description><![CDATA[First off, I enjoy showing my wife thing that I build or write.  She enjoys showing me her projects, but as she is a photographer, her stuff is usually cooler looking.  Fancy cron jobs and database queries just don&#8217;t have the bling of an underwater naked woman in an artful pose. Since I started playing [...]]]></description>
			<content:encoded><![CDATA[<p>First off, I enjoy showing my wife thing that I build or write.  She enjoys showing me her projects, but as she is a photographer, her stuff is usually cooler looking.  Fancy cron jobs and database queries just don&#8217;t have the bling of an underwater naked woman in an artful pose.</p>
<p>Since I started playing with Arduino&#8217;s, my wife knows that her kitchen table will be full of wires and little electronics that our kid doesn&#8217;t need to pull off the table.  Little LED&#8217;s that blink or some serial output to a computer are cool, but not so impressive.  But serial output to an LCD, a cool blue LCD, now things start to get interesting.</p>
<div id="attachment_62" class="wp-caption aligncenter" style="width: 210px"><a href="http://dailyduino.com/wp-content/uploads/2008/08/rfid_reader_lcd.jpg"><img class="size-medium wp-image-62" title="rfid_reader_lcd" src="http://dailyduino.com/wp-content/uploads/2008/08/rfid_reader_lcd-200x300.jpg" alt="RFID Reader" width="200" height="300" /></a><p class="wp-caption-text">RFID Reader</p></div>
<p>Those are pictures of a RFID reader that I built the other day.  My 1.5 year old daughter thinks its the coolest thing.  Not only does an LED light up when a tag is read, but it has that fancy LCD.  Good design should be usable by little kids.  She can work the remote to our Mac&#8217;s, she can work an iPod, and now she can work my RFID reader.</p>
<div id="attachment_67" class="wp-caption aligncenter" style="width: 310px"><a href="http://dailyduino.com/wp-content/uploads/2008/08/rfid_reader_lcd11.jpg"><img class="size-medium wp-image-67" title="rfid_reader_lcd11" src="http://dailyduino.com/wp-content/uploads/2008/08/rfid_reader_lcd11-300x200.jpg" alt="RFID Reader LCD" width="300" height="200" /></a><p class="wp-caption-text">RFID Reader LCD</p></div>
<p>If she knew how to solder, she could probably put one of these LCD&#8217;s together.  I am using 2 LCD&#8217;s from <a href="http://moderndevice.com/LCD.shtml" target="_self">Modern Device</a> and their Serial LCD Board to drive them.  Its as easy as adding a second serial output to your projects to add in an LCD.</p>
<p>There are a few other things you have to send on that serial connection and they are well documented at the bottom of the the above link.  There is also a test function on the Serial Board to make sure you hooked everything up properly.  The board will run either LCD, but you have to have different headers installed and a different resistor for the backlight.  No resistor, just a jumper wire for the 16&#215;2 and a 15 ohm for the 20&#215;4.</p>
<div id="attachment_69" class="wp-caption aligncenter" style="width: 310px"><a href="http://dailyduino.com/wp-content/uploads/2008/08/serial_lcd_board.jpg"><img class="size-medium wp-image-69" title="serial_lcd_board" src="http://dailyduino.com/wp-content/uploads/2008/08/serial_lcd_board-300x145.jpg" alt="LCD117 Serial LCD Board" width="300" height="145" /></a><p class="wp-caption-text">LCD117 Serial LCD Board</p></div>
<p>I had some problems with one of my Serial LCD Boards, but it seems to have been a hardware problem, I resoldered everything and it worked.  Paul at Modern Device has a forum set up where he will help you with any problem.  It&#8217;s very cool to have a company that sells things at good prices and will help you with their products.</p>
<div id="attachment_66" class="wp-caption aligncenter" style="width: 210px"><a href="http://dailyduino.com/wp-content/uploads/2008/08/40_lcd1.jpg"><img class="size-medium wp-image-66" title="40_lcd1" src="http://dailyduino.com/wp-content/uploads/2008/08/40_lcd1-200x300.jpg" alt="20x4 LCD" width="200" height="300" /></a><p class="wp-caption-text">20x4 LCD</p></div>
<p>Here is some example code to send data to the 16&#215;2 LCD (just like the RFID Reader)</p>
<blockquote><p>#include &lt;SoftwareSerial.h&gt;</p>
<p>#define rxPin 4<br />
// rxPin is immaterial &#8211; not used &#8211; just make this an unused Arduino pin number<br />
//the txPin is an unused digital pin, you can use analog pins for digital pins<br />
#define txPin 14 // pin 14 is analog pin 0, on a BBB just use a servo cable <img src='http://dailyduino.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);</p>
<p>void setup(){</p>
<p>pinMode(txPin, OUTPUT);<br />
mySerial.begin(9600);    // 9600 baud is chip comm speed</p>
<p>mySerial.print(&#8220;?G216&#8243;); // set display geometry,  2 x 16 characters in this case<br />
delay(100);               // pause to allow LCD EEPROM to program</p>
<p>mySerial.print(&#8220;?Bff&#8221;);  // set backlight to 40 hex<br />
delay(100);              // pause to allow LCD EEPROM to program</p>
<p>mySerial.print(&#8220;?s6&#8243;);   // set tabs to six spaces<br />
delay(1000);              // pause to allow LCD EEPROM to program</p>
<p>}</p>
<p>void loop(){</p>
<p>mySerial.print(&#8220;?c0&#8243;);          // turn cursor off<br />
delay(300);                //without the delay, the LCD will crash</p>
<p>mySerial.print(&#8220;?f&#8221;);                   // clear the LCD<br />
delay(100);<br />
delay(3000);</p>
<p>mySerial.print(&#8220;?x00?y0&#8243;);              // cursor to first character of line 0</p>
<p>mySerial.print(&#8220;LCD117 test&#8221;);</p>
<p>delay(3000);</p>
<p>mySerial.print(&#8220;?x00?y1&#8243;);          // move cursor to beginning of line 1<br />
mySerial.print(&#8220;moderndevice.com&#8221;);     // crass commercial message</p>
<p>delay(6000);                          // pause three secs to admire</p>
<p>mySerial.print(&#8220;?f&#8221;);                   // clear the LCD</p>
<p>mySerial.print(&#8220;?x00?y0&#8243;);          // move cursor to beginning of line 0</p>
<p>mySerial.print(&#8221; LCD 117 chip by&#8221;);         // displys LCD #117 on the screen</p>
<p>mySerial.print(&#8220;?x00?y1&#8243;);              // cursor to first character of line 1<br />
mySerial.print(&#8221; phanderson.com&#8221;);</p>
<p>delay(3000);                          // pause three secs to admire</p>
<p>mySerial.print(&#8220;?f&#8221;);                   // clear the screen</p>
<p>delay(1000);<br />
}</p></blockquote>
<p><a href="http://dailyduino.com/wp-content/uploads/2008/08/40_lcd2.jpg"><img class="aligncenter size-medium wp-image-65" title="40_lcd2" src="http://dailyduino.com/wp-content/uploads/2008/08/40_lcd2-300x200.jpg" alt="" width="300" height="200" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dailyduino.com/archives/61/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

