<?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>I am ShadowLord&#187; Projects</title>
	<atom:link href="http://iamshadowlord.com/tag/projects/feed" rel="self" type="application/rss+xml" />
	<link>http://iamshadowlord.com</link>
	<description>Interesting to me</description>
	<lastBuildDate>Mon, 26 Mar 2012 03:41:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Greencastle, Independent Film on Kickstarter</title>
		<link>http://iamshadowlord.com/2011/11/greencastle-independent-film-on-kickstarter.html</link>
		<comments>http://iamshadowlord.com/2011/11/greencastle-independent-film-on-kickstarter.html#comments</comments>
		<pubDate>Sun, 06 Nov 2011 15:07:41 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[comedy writing]]></category>
		<category><![CDATA[film]]></category>
		<category><![CDATA[Greencastle]]></category>
		<category><![CDATA[movies]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=347</guid>
		<description><![CDATA[&#8220;Greencastle&#8221; is an upcoming independent film that I am fortunate to be a part of. I make a small cameo as District Dean Roy Baker giving a commencement speech for a correspondence school graduation. Created by my long time comedy writing partner, Koran Dunbar, &#8220;Greencastle&#8221; is a film about a single father who works at a small-town pet store [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Greencastle&#8221; is an upcoming independent film that I am fortunate to be a part of. I make a small cameo as District Dean Roy Baker giving a commencement speech for a correspondence school graduation.</p>
<p>Created by my long time comedy writing partner, Koran Dunbar, &#8220;Greencastle&#8221; is a film about a single father who works at a small-town pet store in Greencastle, PA. Poitier struggles against self-doubt and an unclear life direction while trying to raise his young son. In the midst of his &#8220;quarter-life crisis&#8221; enters Leslie, an attractive woman running from an ugly past. Fate brings them together, but Poitier discovers that opportunities only come to those who take chances, and he must come to terms with his own past before he can embrace his future with confidence.</p>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=hzlqCjIiJI8&#038;fmt=18">www.youtube.com/watch?v=hzlqCjIiJI8</a></p>
</p>
<p>The crew behind &#8220;Greencastle&#8221; filmed the movie over the summer of 2011 and the footage turned out great as you can see in the trailer above. They want to take &#8220;Greencastle&#8221; to a wider audience and looking to use a website called <a title="Greencastle the film on Kickstarter" href="http://www.kickstarter.com/projects/rags2riches/greencastle-every-day-is-a-chance-to-get-it-right" target="_blank">Kickstarter</a> to do so. Have you heard of Kickstarter? Kickstarter is a website where people can post their project and raise funding by offering incentives such as autographed scripts or items related to the output of the project.</p>
<p>&#8220;Greencastle&#8221; is already submitted to film festivals like <a title="SXSW Film Festival" href="http://sxsw.com/film" target="_blank">SXSW</a> and I would love to see where this project could go with everyone&#8217;s help. Check out the <a title="Greencastle movie on Kickstarter" href="http://www.kickstarter.com/projects/rags2riches/greencastle-every-day-is-a-chance-to-get-it-right" target="_blank">Kickstarter</a> for &#8220;Greencastle&#8221; and see if this is something that you are interested in supporting&#8230; Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2011/11/greencastle-independent-film-on-kickstarter.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EL Pumpkin is Spanish for Electroluminescent Pumpkin</title>
		<link>http://iamshadowlord.com/2011/10/el-pumpkin-is-spanish-for-electroluminescent-pumpkin.html</link>
		<comments>http://iamshadowlord.com/2011/10/el-pumpkin-is-spanish-for-electroluminescent-pumpkin.html#comments</comments>
		<pubDate>Sun, 30 Oct 2011 17:26:10 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[EL Wire]]></category>
		<category><![CDATA[halloween]]></category>
		<category><![CDATA[pumpkin]]></category>
		<category><![CDATA[SparkFun]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=335</guid>
		<description><![CDATA[EL Wire is a flexible wire that glows when you apply electricity to it. I am seeing more and more things trimmed with EL Wire and it makes for interesting effect. If you watched America&#8217;s Got Talent you might have seen a finalist called Team iLuminate. The iLuminate team used EL Wire to create animations and lighting [...]]]></description>
			<content:encoded><![CDATA[<p>EL Wire is a flexible wire that glows when you apply electricity to it. I am seeing more and more things trimmed with EL Wire and it makes for interesting effect. If you watched America&#8217;s Got Talent you might have seen a finalist called <a title="Team iLuminate uses EL Wire" href="http://teamiluminate.com/" target="_blank">Team iLuminate</a>. The iLuminate team used EL Wire to create animations and lighting effects on top of group dancing.</p>
<p>My nephews and niece were in town for Halloween and I was struck with the idea of adding a little animation to our Halloween Pumpkin. I wanted to make a pumpkin that changed expression. We made a basic smiley face and angry face by carving grooves into the face of the pumpkin. Then, we laced the EL Wire in and out of the grooves. We used red for the mad expression and blue and green for the smile expression. It was pretty easy to do and I had fun sharing my bits knowledge with the kids. It was rewarding to hear them come up with their own ideas &#8212; &#8220;We could hook an MP3 player up to this and scare people&#8221; or, &#8220;What if we added motion detection?&#8221;. It was also fun to hear my 5-year-old niece Zoey say, &#8220;Electroluminescent&#8221;.</p>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=Kc2yjj0oYdo&#038;fmt=18">www.youtube.com/watch?v=Kc2yjj0oYdo</a></p>
</p>
<h3>Parts:</h3>
<ul>
<li><a title="SparkFun EL Inverter 12v for EL Wire" href="http://www.sparkfun.com/products/10469" target="_blank">EL Inverter &#8211; 12v</a></li>
<li>EL Wire &#8211; <a title="Red EL Wire from SparkFun" href="http://www.sparkfun.com/products/10191" target="_blank">Red</a>, <a title="Green EL Wire from SparkFun" href="http://www.sparkfun.com/products/10200" target="_blank">Green</a>, and <a title="SparkFun Blue EL Wire" href="http://www.sparkfun.com/products/10195" target="_blank">Blue</a> (3 meter length)</li>
<li><a title="12VDC Power Supply from SparkFun" href="http://www.sparkfun.com/products/9442" target="_blank">Wall Adapter Power Supply</a> &#8211; 12VDC, 600mA</li>
</ul>
<h3>Notes:</h3>
<p>I think the Blue EL Wire worked the best and looked the best. The red looks a little orange. The Green EL Wire sometimes didn&#8217;t illuminate. You can only illuminate 2 strands of EL Wire at a time with the stuff I had from SparkFun. I need to experiment more with EL Wire and get an EL Wire controller to do some more intricate animations. I will post future projects if I come up with anything interesting.</p>
<p>Always start with sketches when you start your project. It&#8217;s important to have a plan to allow yourself to stray knowingly.</p>
<div>
<div id="attachment_341" class="wp-caption aligncenter" style="width: 434px"><a href="http://iamshadowlord.com/wp-content/uploads/2011/10/EL_Pumpkin_Sketches.jpg"><img class="size-full wp-image-341" title="EL Pumpkin Sketches" src="http://iamshadowlord.com/wp-content/uploads/2011/10/EL_Pumpkin_Sketches.jpg" alt="EL Pumpkin Sketches" width="424" height="535" /></a><p class="wp-caption-text">EL Pumpkin Sketches</p></div>
<p>EL Wire is LED of the future if you ask me&#8230;</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2011/10/el-pumpkin-is-spanish-for-electroluminescent-pumpkin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThingSpeak: Building My Own Twitter (for Things)</title>
		<link>http://iamshadowlord.com/2011/02/thingspeak-building-my-own-twitter-for-things.html</link>
		<comments>http://iamshadowlord.com/2011/02/thingspeak-building-my-own-twitter-for-things.html#comments</comments>
		<pubDate>Sat, 19 Feb 2011 21:54:10 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[ThingSpeak]]></category>
		<category><![CDATA[internet of things]]></category>
		<category><![CDATA[iobridge]]></category>
		<category><![CDATA[netduino]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[thingspeak]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web of things]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=292</guid>
		<description><![CDATA[Over the past several months I have been working on software to allow &#8220;things&#8221; to form social networks and send status updates via the Internet. At first glance this may sound very impractical. Hopefully, in a few years this will make more sense as better applications come out. Remember how ridiculous my toaster sounded three years ago? [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past several months I have been working on software to allow &#8220;things&#8221; to form social networks and send status updates via the Internet. At first glance this may sound very impractical. Hopefully, in a few years this will make more sense as better applications come out. Remember how ridiculous my toaster sounded three years ago? I gave that thing a voice and since has been on TV and more people are interested in it than my Twitter status updates. More proof? At CES 2011 there were at least 10 appliances that could send Twitter status updates. I am not saying that I created them, but I am not not saying that they didn&#8217;t know about <a title="Social networking for my toaster and appliances" href="http://iamshadowlord.com/2008/12/social-networking-for-my-toaster.html" target="_self">My  Toaster</a> and it&#8217;s 600+ followers on <a title="mytoaster on Twitter" href="http://www.twitter.com/mytoaster" target="_blank">Twitter</a>. With this project, I wanted to take it a few steps further and build something from the ground up that&#8217;s focused on collecting enormous amounts of data from everyday objects, allowing devices to interact with each other, and building applications to present some meaning. The <a title="Open Web of Things Project" href="http://www.thingspeak.com" target="_blank">ThingSpeak</a> project is finally ready to go and open to anyone that wants to start building applications.</p>
<p><strong>My Problem</strong></p>
<p>One problem with the Internet of Things is the concept of &#8220;the killer app&#8221; &#8211; the app that defines a new industry. The internet connected refrigerator is our poster child. Recently, Ryan Rusnak connected a <a title="Intenet connected mini fridge beer cannon" href="http://www.iobridge.net/projects/2010/12/network-and-iphone-controlled-mini-fridge-drink-cannon/" target="_blank">mini fridge</a> to the iPhone via ioBridge, added a motor controlled beer selector, and strapped on an air cannon to fire beers to his couch from 25 feet away &#8211; now that&#8217;s a killer app. So, my problem was trying to find an application that highlights key features of ThingSpeak and why it&#8217;s different.</p>
<p><strong>My App</strong></p>
<p>What I come up with is the idea of &#8220;my_house&#8221;. &#8220;my_house&#8221; is a collection of &#8220;rooms&#8221; that all hold computers, appliances, and sensors aka things. I recently installed some light sensors in &#8220;my_room&#8221; that push light levels to the ThingSpeak API. I did this to remind me when to turn my lights on so I don&#8217;t work in the dark when I get plugged in. And an interesting side benefit was that now I can detect whether or not someone is in the room based on the light level. I will admit this could have been done other ways, but sometimes you solve problems with what you have lying around. &#8220;my_house&#8221; already keeps track of my location using Google Latitude to <a title="Automatic Thermostat Control Based on Location and Weather" href="http://iamshadowlord.com/2010/09/automatic-thermostat-control-based-on-location-and-weather.html" target="_self">control my thermostat</a>. Eureka moment&#8230;</p>
<p style="text-align: center;"><em><strong>Now I can tell when my mom goes into my room when I am out on the town, most likely <a title="Sheetz" href="http://sheetz.com" target="_blank">Sheetz</a>!!!</strong></em></p>
<p>Below is a screenshot of the demo app and how I aggregate the data collected by my light sensors. Here are a few things I want to point out:</p>
<ul>
<li>&#8220;my_house&#8221; is sending the status updates via a collection of networked sensors</li>
<li>The status updates were generated by the light sensor device itself</li>
<li>The timestamps were recorded by the ThingSpeak API</li>
<li>If you click the chart icon you get what the actual light level was</li>
<li>The app works in real-time and you can check it out <a title="Twitter for Things - ThingSpeak Demo App" href="http://iamshadowlord.com/thingspeak" target="_blank">here</a></li>
</ul>
<p><a title="ThingSpeak Demo Application" href="http://iamshadowlord.com/thingspeak" target="_blank"><img class="aligncenter size-full wp-image-293" title="&quot;Twitter of Things&quot; ThingSpeak Demo App" src="http://iamshadowlord.com/wp-content/uploads/2011/02/ThingSpeak_Twitter_Demo_App.png" alt="&quot;Twitter of Things&quot; ThingSpeak Demo App" width="387" height="657" /></a></p>
<p><strong><br />
The Technical Details</strong></p>
<p>The light sensor uses a Netduino Plus that connects to my home network over Ethernet. This device uses Microsoft .NET Micro Framework and I wrote an application that interfaces with the ThingSpeak API. I also wrote a tutorial over at the ThingSpeak community site on how to use the <a title="ThingSpeak Tutorial for the Netduino Plus" href="http://community.thingspeak.com/tutorials/netduino/create-your-own-web-of-things-using-the-netduino-plus-and-thingspeak/" target="_blank">Netduino Plus</a> for those that want to get started with it fast.</p>
<p>The front-end application is written using only HTML, CSS, and jQuery. I have the fully documented source code attached and you can also see the app <a title="Twitter of Things Demo App using the ThingSpeak API" href="http://iamshadowlord.com/thingspeak" target="_blank">live</a> in your web browser.</p>
<p>Project Files:</p>
<ul>
<li><a title="Netduino Plus Application" href="http://community.thingspeak.com/netduino/ThingSpeak.zip">Netduino Plus .NET Project</a></li>
<li><a title="ThingSpeak Demo Project Apps" href="http://iamshadowlord.com/thingspeak/ThingSpeak-Twitter.zip">Twitter of Things Demo App</a></li>
</ul>
<p style="text-align: center;"><a title="Create your own Web of Things using the Netduino Plus and ThingSpeak" href="http://community.thingspeak.com/tutorials/netduino/create-your-own-web-of-things-using-the-netduino-plus-and-thingspeak/" target="_blank"><img class="aligncenter" title="Light Sensor connected to the Netduino Plus" src="http://community.thingspeak.com/wp-content/uploads/2011/01/Light-Sensor-Netduino_Plus.jpg" alt="Light Sensor connected to the Netduino Plus" width="480" height="350" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2011/02/thingspeak-building-my-own-twitter-for-things.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Automatic Thermostat Control Based on Location and Weather</title>
		<link>http://iamshadowlord.com/2010/09/automatic-thermostat-control-based-on-location-and-weather.html</link>
		<comments>http://iamshadowlord.com/2010/09/automatic-thermostat-control-based-on-location-and-weather.html#comments</comments>
		<pubDate>Tue, 14 Sep 2010 13:56:51 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[home automation]]></category>
		<category><![CDATA[internet of things]]></category>
		<category><![CDATA[iobridge]]></category>
		<category><![CDATA[latitude]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=239</guid>
		<description><![CDATA[The Pittsburgh Perl Workshop will be held at the Carnegie Mellon University on October 9-10, 2010. The PPW is a gathering of Perl programmers from around the world (and near Pittsburgh) to learn more and discuss the future of Perl. At this year&#8217;s PPW, I will be giving a talk called, &#8220;Connecting the Internet of Things [...]]]></description>
			<content:encoded><![CDATA[<p>The <a title="Pittsburgh Perl Workshop 2010" href="http://pghpw.org/ppw2010/" target="_blank">Pittsburgh Perl Workshop</a> will be held at the Carnegie Mellon University on October 9-10, 2010. The PPW is a gathering of <a title="Perl Wiki" href="http://en.wikipedia.org/wiki/Perl" target="_blank">Perl</a> programmers from around the world (and near Pittsburgh) to learn more and discuss the future of Perl.</p>
<p>At this year&#8217;s PPW, I will be giving a talk called, &#8220;<strong><em>Connecting the Internet of Things with Perl</em></strong>&#8221; (visit <a title="Pittsburgh Perl Conference Schedule for Internet of Things talk by Hans Scharler" href="http://pghpw.org/ppw2010/talk/3043" target="_blank">pghpw.org</a> for schedule info). I will also explain how to create an Internet of Things application using off-the-shelf Perl modules and web control technology by <a title="ioBridge Technology" href="http://www.iobridge.com/technology" target="_blank">ioBridge</a>.</p>
<p>As you may or may not know, Perl is a really powerful programming language that enables everything from fast prototyping of web applications to large-scale software platforms. What makes the language unique is the library of modules available to you. If you get a great new idea for a web app, you can get started quickly and find modules that others have written. In some cases, it&#8217;s literally copy-and-paste.</p>
<p>A big movement for the past few years is this concept of The Internet of Things. More things will be on the Internet than people in the next few years, so my talk is to highlight why Perl is still relevant after 20 years and needs to be apart of this emerging technology. Internet of Things applications involve connecting sensors and controllers to the web. Perl is perfect for parsing lots of data, pushing data into databases, and connecting services together, known as &#8220;mashups&#8221;.</p>
<p>My Internet of Things project, written in Perl, allows your current location and home weather conditions to control your home heating and cooling system.</p>
<div id="attachment_253" class="wp-caption aligncenter" style="width: 560px"><a href="http://iamshadowlord.com/wp-content/uploads/2010/09/Google-Latitude-ioBridge-Mashup2.jpg"><img class="size-full wp-image-253" title="Location Aware Home Automation" src="http://iamshadowlord.com/wp-content/uploads/2010/09/Google-Latitude-ioBridge-Mashup2.jpg" alt="Location Aware Home Automation using Google Latitude API and ioBridge API" width="550" height="433" /></a><p class="wp-caption-text">Location Aware Home Automation</p></div>
<p>I call it,  &#8221;Location Aware Home Automation&#8221;. You don&#8217;t have to do anything to control your HVAC/Thermostat, it all happens based on where you are. If you are home, the thermostat regulates the inside temperature as normal. When you leave, systems turn off or enter power saving modes. When you get near your home, the heating/cooling system kicks back on so you have a comfortable temperature by the time you get back home. In order to pull off all of this passive and automatic functionality, I have mashed up several APIs from Google Latitude, WeatherBug, and ioBridge.</p>
<p>Using the API for Google Latitude, I track the location of my Android mobile phone. When I get near my home, I check the weather using Google Weather API, WeatherBug API, and my home temperature (via ioBridge) to see if I need to to use the air conditioner, the heater, or neither. If I do need to control the HVAC, I send the control commands using the ioBridge API that routes the commands to the IO-204 controller that&#8217;s hooked up to my thermostat.</p>
<p>This application is really just a beginning. Right after I got everything working, I started having a flood of ideas. I can see some real power here.</p>
<p><strong><em>The How To Portion of the Show</em></strong></p>
<p>&gt;&gt; Google Latitude</p>
<p>You have to enable Google Latitude on your mobile phone and get your Badge ID. This ID represents your position in the world, your latitude and longitude. Visit the <a title="Google Latitude API and Badge ID" href="http://www.google.com/latitude/apps/badge" target="_blank">Google Latitude API</a> site for more information.</p>
<p>Install the latest <a title="Google Latitude Perl Module" href="http://search.cpan.org/~mrdvt/Geo-Google-Latitude-0.06/lib/Geo/Google/Latitude.pm" target="_blank">Geo::Google::Latitude</a> Perl module from CPAN.org &#8211; this module completely abstracts the access to the Google Latitude API for you. All you have to do us pass your ID and the module returns the date, time, last known latitude and longitude (the values are in decimal degrees).</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">use Geo::Google::Latitude;<br />
my $gl=Geo::Google::Latitude-&gt;new;<br />
my $id=&quot;7832225593622256926&quot;;<br />
my $badge=$gl-&gt;get($id);<br />
my ($lat2, $lon2) = $badge-&amp;gt;point-&gt;latlon;</div></div>
<p>&gt;&gt; Calculating how far you are away  from home</p>
<p>You have to figure out how far you are from home, you do this by doing some math. Oh wait, there&#8217;s a Perl module for that. Install <a title="Geo::Distance Perl Module on CPAN used to calculate distance between positions" href="http://search.cpan.org/~bluefeet/Geo-Distance-0.16/lib/Geo/Distance.pm" target="_blank">Geo::Distance</a> and all you have to do is tell it what latitude and longitude to compare and it spits out the distance.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">use Geo::Distance;<br />
my $geo = new Geo::Distance;<br />
### Home Location<br />
my $lon1 = &quot;-79.76408&quot;;<br />
my $lat1 = &quot;39.980342&quot;;<br />
### Calculated Distance<br />
my $distance = $geo-&gt;distance( 'mile', $lon1, $lat1 =&gt;; $lon2, $lat2 ); # Use 'meter' to calculate distance in meters</div></div>
<p>&gt;&gt; Getting the Weather</p>
<p>You can use a number of weather APIs to get weather data for your home location. All you need to know is where you live. The easiest to implement is Google Weather (<a title="Google Weather API" href="http://search.cpan.org/~possum/Weather-Google-0.05/lib/Weather/Google.pm" target="_blank">Weather::Google</a>), but the WeatherBug API has a lot more information you can use for other Internet of Things things you may do.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;use Weather::Google;<br />
my $gw = new Weather::Google(15401); # Zipcode<br />
my $current_outside = $gw-&gt;current-&gt;{temp_f}; #Use temp_c for Celsius</div></div>
<p>&gt;&gt; Connect to ioBridge</p>
<p>All you have to do to connect with ioBridge is to send command via the <a title="ioBridge Widget API" href="http://www.iobridge.net/wiki/api/static-widget-api" target="_blank">ioBridge Widget API</a>. First you create the control widgets for your heating and cooling system. For mine, I can use relays. Others may need serial strings, which you can send as well. Once you have the widgets created, locate there widget ID&#8217;s and send them to the API.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">use LWP::Simple;<br />
my $Air_Conditioner_widgetID = &quot;Gb2Q1FUKPmzZ&quot;; ### Replace with your widget ID's<br />
my $Heater_widgetID = &quot;9c3WEGHKemnzJ&quot;;<br />
my $Inside_Temp_widgetID = &quot;D32SDghy98iOu&quot;;<br />
my $ioBridgeAPI = &quot;&quot;;<br />
$ioBridgeAPI = &quot;http://www.iobridge.com/widgets/static/id=&quot; . $Inside_Temp_widgetID . &quot;&amp;value=1&amp;format=text&quot;;<br />
my $current_inside = get($ioBridgeAPI);<br />
### Test if the heater or the air condition should be turned on<br />
if ($current_outside &gt;= 78 &amp;&amp; $current_inside &gt;= 72) {<br />
$ioBridgeAPI = &quot;http://www.iobridge.com/widgets/static/id=&quot; . $Air_Conditioner_widgetID . &quot;&amp;value=1&amp;format=text&quot;;<br />
get($ioBridgeAPI);<br />
}<br />
elsif ($current_outside &lt;= 60 &amp;&amp; $current_inside &lt;= 68 ) {<br />
$ioBridgeAPI = &quot;http://www.iobridge.com/widgets/static/id=&quot; . $Heater_widgetID . &quot;&amp;value=1&amp;format=text&quot;;<br />
get(&quot;$ioBridgeAPI&quot;);<br />
}</div></div>
<p>&gt;&gt; Putting it all together</p>
<p>Once you have the entire built all you have to do is call the app periodically using CRON Linux or Task Scheduler on Windows. Here is a <a href="http://iamshadowlord.com/LocationAwareAutomation.txt">TXT file</a> of the Perl application with all of the parts tied together, probably will be easier to read and understand.</p>
<p>The hardware side uses the <a title="ioBridge IO-204 Internet Monitor and Control Module" href="http://www.iobridge.com" target="_blank">ioBridge IO-204</a> connected to the control lines of a <a title="Remotely enabling and disabling a thermostat" href="http://www.thomaswlewis.com/?p=567" target="_blank">thermostat</a> or an HVAC control box. The lines switch at 12 volts, so I use relays trigger them. Other thermostats that I researched use serial lines which the IO-204 can tap into using RS-232.</p>
<p>It may seem like a lot of work, but just think about what is happening. Feeds from Google Latitude and WeatherBug are being processed and passed to your home network via the Internet. All of this is happening without your direct interaction &#8211; your things are working for you. I hope that you can see that is a start of some pretty amazing applications of technologies that will advance over time. A lot has changed in the past year, I can&#8217;t image what comes next.</p>
<p>If you get around to building a project like this, please drop me a line. I love this stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2010/09/automatic-thermostat-control-based-on-location-and-weather.html/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Dominion Card Game Review and Storage Project</title>
		<link>http://iamshadowlord.com/2010/07/dominion-card-game-review-and-storage-project.html</link>
		<comments>http://iamshadowlord.com/2010/07/dominion-card-game-review-and-storage-project.html#comments</comments>
		<pubDate>Wed, 28 Jul 2010 21:06:44 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[cards]]></category>
		<category><![CDATA[Dominion]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=215</guid>
		<description><![CDATA[Thanks to my friends in the StruebSquad, I have been playing a lot of board games as of late. They started me off with some pretty stock games and then slowly introduced me to deeper Euro Games, Cooperative Games, Abstract Strategy, and Miniatures Games. Now I know what Meeples are, I have said, &#8220;I have Wood for [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to my friends in the StruebSquad, I have been playing a lot of board games as of late. They started me off with some pretty stock games and then slowly introduced me to deeper Euro Games, Cooperative Games, Abstract Strategy, and Miniatures Games. Now I know what Meeples are, I have said, &#8220;I have Wood for Sheep&#8221;, and I have even oar raked another ship recreating an ancient naval battle.</p>
<p style="text-align: center;"><a title="Dominion Card Game Storage by hscharler, on Flickr" href="http://www.flickr.com/photos/nothans/4837829763/"><img src="http://farm5.static.flickr.com/4145/4837829763_c0e7cae1a7.jpg" alt="Dominion Card Game Storage" width="500" height="375" /></a></p>
<p>The latest game I have been playing is called, &#8220;<a title="Dominion Card Game by Rio Grande Games" href="http://www.boardgamegeek.com/boardgame/36218/dominion" target="_blank">Dominion</a>&#8221; by <a title="Designer of Dominion" href="http://www.boardgamegeek.com/boardgamedesigner/10525/donald-x-vaccarino" target="_blank">Donald X. Vaccarino</a> and published by <a title="Rio Grande Games" href="http://www.riograndegames.com/games.html?id=278" target="_blank">Rio Grande Games</a> in the United States. Dominion is a board game style card game. In the box you get a number of action cards, resource cards, and victory point cards. Each game you pick 10 of the action cards which will be common for all of the players. With resource cards like Copper, Gold, Silver, and Potions, you can buy action cards, resource cards, and victory point cards. At the end of the game you add up the victory point cards and the player with the most points wins the game. Each turn you can play an action card and/or buy cards if you have the right resources. Dominion starts with collecting actions and resources and finishes with a race to gain victory points. During the whole you are striking a balance with resources, actions, and victory points.</p>
<p>I really love this game and my appeal for Dominion is three fold:</p>
<ul>
<li><strong>It&#8217;s highly re-playable</strong> &#8211; with new expansion and card combinations, you can play a new game almost every time</li>
<li><strong>It&#8217;s really balanced</strong> &#8211; everyone has the same chances to get the common action cards, unlike a lot of other card games</li>
<li><strong>It has a lot of strategy</strong> &#8211; you have to adapt to how other people play, find good card combos, and know when to switch between gaining resources to gaining victory points</li>
</ul>
<p>Digression&#8230;</p>
<p>You might be thinking, &#8220;Hans, I have not heard of this game before, what gives?&#8221; My quick reply would be, &#8220;There are a lot of games out there,&#8221; Hans said gamely. If you have grown up in the United States, there are a few games that everyone has been introduced to &#8211; Monopoly, Sorry, The Game of Life, Candy Land &#8211; if you are &#8220;lucky&#8221; you might have played Risk, Scrabble, Stratego, and Trivial Pursuit. In general, you will notice that US favorite games are mostly luck based, meaning you use a randomizer (dice or a wheel) and then move a piece on the board. There is a big part of the game you can&#8217;t control, but in most cases these games are fun. Some of my best memories as a kid was playing games with the family and extended family. Now, in other parts of the world the games are less luck based and more choice based. Most European and Korean games are games played with a lot of choices. You have to choose what to do and each player has the same opportunity. As long as your playing board games, I am okay with either style of game or a game with a good combination of luck and choices. I recommend Lost Cities, Pandemic, Acquire, Settlers of Catan, Power Grid, and <a title="Divide and Conquer Game by Hans Scharler" href="http://www.divideandconquergame.com" target="_blank">Divide and Conquer</a> <img src='http://iamshadowlord.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  to name a few gateway games.</p>
<p>Regression&#8230;</p>
<p>The designer and publishers of Dominion have released multiple expansions and promo cards that add more action cards and twist to the base game. An issue of storage and portability comes into play. You want to take Dominion over to a friend&#8217;s house or to a convention, you would have to carry 4 boxes. After some research online [<a title="Dominion Card Labels" href="http://www.boardgamegeek.com/filepage/53771/divider-labels-treasure-banner-style-in-300dpi-inc" target="_blank">Labels</a>, <a title="How to divide up a Dominion game box" href="http://www.theboardgameblog.com/2010/02/step-by-step-fit-dominion-and-its-expansions-in-one-box/" target="_blank">Box</a>], I created my own storage solution. I took one box and pasted in dividers. Using card stock and labels, I then added dividers for each set of cards. The result is that all of the cards are in one box in order like a file cabinet.</p>
<p style="text-align: center;"><a title="Dominion Card Game Storage by hscharler, on Flickr" href="http://www.flickr.com/photos/nothans/4837819401/"><img src="http://farm5.static.flickr.com/4151/4837819401_b513391876.jpg" alt="Dominion Card Game Storage" width="500" height="375" /></a></p>
<p style="text-align: left;">Looks like there will be a new expansion for Dominion called Prosperity that is scheduled for release Aug/Sep 2010. Just maybe it will be ready for Gen Con 2010 that starts in early August this year. The good news is that I think that expansion will fit in my uni-box as well. The box is getting heavy.</p>
<p style="text-align: left;">It&#8217;s time for you to Throne Room + Woodcutter and buy Dominion and the expansions.</p>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2010/07/dominion-card-game-review-and-storage-project.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mini Vox Robot Hacking</title>
		<link>http://iamshadowlord.com/2010/05/mini-vox-robot-hacking.html</link>
		<comments>http://iamshadowlord.com/2010/05/mini-vox-robot-hacking.html#comments</comments>
		<pubDate>Mon, 10 May 2010 03:56:28 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tweaks]]></category>
		<category><![CDATA[Iron Man]]></category>
		<category><![CDATA[Mini Vox]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[Toy Hacks]]></category>
		<category><![CDATA[voice control]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=156</guid>
		<description><![CDATA[Yes, I went to Radio Shack today. And, yes, I will still call it Radio Shack. And, yes, sometimes you need a quick electronics fix. I get most of my stuff online these days. Radio Shack had the Erector Spykee Mini Vox robot on sale for $10. The Mini Vox takes voice commands and makes the robot [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, I went to Radio Shack today. And, yes, I will still call it Radio Shack. And, yes, sometimes you need a quick electronics fix. I get most of my stuff online these days.</p>
<p>Radio Shack had the <a title="Spykee Mini Vox - voice enabled robot" href="http://www.amazon.com/Erector-870885E-Spykee-Mini-Vox/dp/B00243FHFO" target="_blank">Erector Spykee Mini Vox</a> robot on sale for $10. The Mini Vox takes voice commands and makes the robot move, talk, dance, and even fire a &#8220;laser.&#8221; The box says, &#8220;Ages 7+&#8221; &#8211; I fit that category. The box also says, &#8220;Some assembly required.&#8221; It should have said, &#8220;Some de-assembly required.&#8221;</p>
<div id="attachment_158" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.amazon.com/Erector-870885E-Spykee-Mini-Vox/dp/B00243FHFO"><img class="size-medium wp-image-158" title="Mini Vox Voice Controlled Robot" src="http://iamshadowlord.com/wp-content/uploads/2010/05/Mini-Vox-Box-300x300.jpg" alt="Mini Vox Voice Controlled Robot" width="300" height="300" /></a><p class="wp-caption-text">Mini Vox Voice Controlled Robot</p></div>
<p>While playing with the demo model at the store, I realized that I could reuse the voice commands to set inputs on a microcontroller.</p>
<p>The voice commands go something like this:</p>
<blockquote><p>&#8220;Mini Vox&#8221;</p>
<p>Robot beeps</p>
<p>&#8220;Forward&#8221;</p>
<p>Robot moves forward</p></blockquote>
<p>Here are all of the commands and their response:</p>
<ol>
<li><strong>&#8220;Forward&#8221;</strong> &#8211; <em>DC motors get positive voltage</em></li>
<li><strong>&#8220;Backup&#8221;</strong> &#8211; <em>DC motors get negative voltage</em></li>
<li><strong>&#8220;Turn Left&#8221;</strong> &#8211; <em>One DC motor gets positive voltage and the other negative</em></li>
<li><strong>&#8220;Turn Right&#8221;</strong> &#8211; <em>One DC motor gets positive voltage and the other negative</em></li>
<li><strong>&#8220;Laser War&#8221;</strong> &#8211; <em>LEDs flash and RGB LED flashes different colors</em></li>
<li><strong>&#8220;Yo Man&#8221;</strong> &#8211; <em>Says &#8220;Yo Man&#8221; back at you and RGB LED flashes different colors</em></li>
<li><strong>&#8220;Electro Dance&#8221;</strong> &#8211; Makes sounds, <em>LEDs flash, RGB LED flashes different colors, and DC motors pulse on and off</em></li>
<li><strong>&#8220;Destroy Target&#8221;</strong> &#8211; <em>Says, &#8220;This is my favorite,&#8221; makes sounds, flashes LEDs, and RGB LED flashes colors</em></li>
</ol>
<p>When I got Mini Vox home, I ripped it apart. I was quite surprised how responsive the voice commands are and how many parts are inside this little robot. Most of the parts are reusable.</p>
<p>Here&#8217;s what you get for your $10 investment:</p>
<ul>
<li>Orange LED (x2)</li>
<li>RGB LED</li>
<li>DC Motor (x2)</li>
<li>Motor Driver Circuit Boards (x2)</li>
<li>8 ohm Speaker</li>
<li>Microphone</li>
<li>Slider Switch</li>
<li>Momentary Push Button</li>
<li>Lots of screws</li>
</ul>
<p style="text-align: center;"><a title="Mini Vox Guts by hscharler, on Flickr" href="http://www.flickr.com/photos/nothans/4594324464/"><img class="aligncenter" src="http://farm4.static.flickr.com/3376/4594324464_dab12a4f88.jpg" alt="Mini Vox Guts" width="500" height="375" /></a></p>
<p>The forward and the back up voice commands are the easiest to tap into. You can disconnect the DC motors and connect them to a digital input of a microcontroller and now you can use voice commands to set the state of 2 digital inputs and act on them.</p>
<p>If I come up with something clever, I will let you know. But, the first piece of my Iron Man suit has fallen into place.</p>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2010/05/mini-vox-robot-hacking.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>$10 Mont Blanc Rollerball Hack</title>
		<link>http://iamshadowlord.com/2010/04/mont-blanc-rollerball-hack.html</link>
		<comments>http://iamshadowlord.com/2010/04/mont-blanc-rollerball-hack.html#comments</comments>
		<pubDate>Sat, 17 Apr 2010 20:59:26 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tweaks]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[mont blanc]]></category>
		<category><![CDATA[pen]]></category>
		<category><![CDATA[rollerball]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=144</guid>
		<description><![CDATA[My dad gave me a Mont Blanc pen as a gift awhile back. I love the pen &#8211; it writes amazingly smooth, it&#8217;s rather expensive, and I also don&#8217;t want to lose it. On the site Instructables.com, I found a pen hack tutorial. Someone figured out that the refill for the Mont Blanc rollerball pen is the same [...]]]></description>
			<content:encoded><![CDATA[<p>My dad gave me a Mont Blanc pen as a gift awhile back. I love the pen &#8211; it writes amazingly smooth, it&#8217;s rather <a title="Mont Blanc pens on Google Shopping" href="http://www.google.com/products?hl=en&amp;q=mont%20blanc%20rollerball&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;tab=wf" target="_blank">expensive</a>, and I also don&#8217;t want to lose it.</p>
<p>On the site <a title="DIY Projects site Instructables" href="http://www.instructables.com" target="_blank">Instructables.com</a>, I found a pen hack tutorial. Someone figured out that the refill for the Mont Blanc rollerball pen is the same as the refill for the Pilot G2 pen. The Mont Blanc is so nice because of the tip and the refill has the nib right on it. I picked up some office supplies and recreated the project. I bought a Pilot G2 for $3 and a Mont Blanc rollerball refill for $7 at Staples. My Pilot G2 / Mont Blanc rollerball pen turned out great. I feel much more comfortable carrying the hacked version around.</p>
<p style="text-align: center;"><a title="The Pilot G2 Mont Blanc by hscharler, on Flickr" href="http://www.flickr.com/photos/nothans/4528648919/"><img class="aligncenter" src="http://farm5.static.flickr.com/4045/4528648919_4a2c52163d.jpg" alt="The Pilot G2 Mont Blanc" width="500" height="118" /></a></p>
<p><strong><em>Here are some tips:</em></strong></p>
<ul>
<li>You can get blue or black Mont Blanc refills.</li>
<li>The Pilot G2 is the &#8220;0.7 Fine Point&#8221; version of the pen.</li>
<li>The Mont Blanc rollerball refill is slightly larger than the ink cartridge of the Pilot G2.</li>
</ul>
<blockquote><p>All you have to do is trim down the Mont Blanc refill and match the size. I took some sand paper and smoothed down the plastic endcap to match the size of the Pilot G2 rollerball cartridge.</p></blockquote>
<p><strong><em>Here are the <a title="Instructables tutorial on how to create a Pilot Mont Blanc pen in 2 minutes" href="http://www.instructables.com/id/Save-200-in-2-Minutes-and-have-the-Worlds-Best-W/" target="_blank">tutorial</a> and <a title="YouTube video of the Mont Blank Hack using the Pilot G2 rollerball and Mont Blanc refill" href="http://www.youtube.com/watch?v=0SR1Q2ePeAk" target="_blank">video</a> I watched to create my own $10 Mont Blanc Rollerball:</em></strong></p>
<p style="text-align: center;">
<p><a href="http://www.youtube.com/watch?v=0SR1Q2ePeAk&#038;fmt=18">www.youtube.com/watch?v=0SR1Q2ePeAk</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2010/04/mont-blanc-rollerball-hack.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TouchShield Slide Two-way Communications</title>
		<link>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html</link>
		<comments>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html#comments</comments>
		<pubDate>Sun, 21 Mar 2010 09:26:57 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[TouchShield Slide]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[liquidware]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[serial]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=118</guid>
		<description><![CDATA[Over last summer, I got the GamePack from Liquidware which includes a touch screen display, joystick, microcontroller, and battery pack. With this kit you can make a GameBoy from scratch. With some blood, sweat, and tears, I was able to re-create some games like Asteroids and Tetris. The touch screen is called the TouchShield Slide [...]]]></description>
			<content:encoded><![CDATA[<p>Over last summer, I got the <a title="Game Kit from Liquid Ware" href="http://www.liquidware.com/shop/show/GMP/GamePack" target="_blank">GamePack</a> from Liquidware which includes a touch screen display, joystick, microcontroller, and battery pack. With this kit you can make a GameBoy from scratch. With some blood, sweat, and tears, I was able to re-create some games like <a title="Asteriods game for TouchShield Slide and InputShield from LiquidWare" href="http://www.liquidware.com/apps/show/73" target="_blank">Asteroids</a> and Tetris.</p>
<p>The touch screen is called the TouchShield Slide which is a 320×240 OLED and resistive touch screen. The screen also has a microcontroller that is Arduino compatible and expands your program space. Since the screen is really a microcontroller in disguise, it can be used for many types of projects. Overall I am very happy with the screen, but I realized I didn&#8217;t know how to use it very well. I set out to learn and develop a protocol / reusable library that allows the screen to talk to a microcontroller and vice-verse. So I wanted to take a moment and explain what I learned &#8211; maybe you can get going faster than I did.</p>
<p><em><strong>The Goal</strong></em></p>
<p>My goal is to be able to display data on the screen that has been received from another device. The data requested would be initiated by a touch on the screen. The protocol has to be consistent and reliable, while being flexible enough to be the basis for future projects.</p>
<div id="attachment_119" class="wp-caption aligncenter" style="width: 556px"><a title="TouchShield Slide Touch Screen, OLED display at Liquidware" href="http://www.liquidware.com/shop/show/TSL/TouchShield+Slide" target="_blank"><img class="size-full wp-image-119" title="Touch -&gt; TouchShield Slide -&gt; Arduino -&gt; TouchShield Slide" src="http://iamshadowlord.com/wp-content/uploads/2010/03/System-Overview.jpg" alt="Touch -&gt; TouchShield Slide -&gt; Arduino -&gt; TouchShield Slide" width="546" height="386" /></a><p class="wp-caption-text">Touch -&gt; TouchShield Slide -&gt; Arduino -&gt; TouchShield Slide</p></div>
<p><strong><em>Programming Tips and Tricks</em></strong></p>
<p>I found quite a few libraries and resources on <a title="TouchShield wiki" href="http://www.liquidware.com/wikipages/name/TouchShield" target="_blank">liquidware.com</a>.  I also discovered quite a few important things through my trial and error. My biggest frustration was with programming and figuring out the IDE. Here are some tips.</p>
<ul>
<li>To program the screen use the <a title="Antipasto Arduino IDE" href="http://www.liquidware.com/wikipages/1" target="_blank">Antipasto Arduino / Aardvark IDE</a></li>
<li>Program the screen and Arduino separately - make sure the IDE has the proper device selected</li>
<li>To put the screen in program mode, press the switch beside the power connector &#8211; it&#8217;s in program mode when the LED on the backside is red</li>
</ul>
<p><strong><em>TouchShield Slide Serial</em></strong></p>
<p>Serial data sent and received by the TouchShield Slide uses the hardware serial lines.</p>
<p>To setup the serial connection, place this line in your setup code block:</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Serial.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">9600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Now you can read and write to and from the serial buffer. To read in a whole string, use a byte array to store bytes from the serial buffer when serial data is available. To write to the serial buffer, simply use serial print.</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333;">char</span> charIn <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
byte i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #993333;">char</span> stringIn<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">32</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>Serial.<span style="color: #202020;">available</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
charIn <span style="color: #339933;">=</span> Serial.<span style="color: #202020;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
stringIn<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> charIn<span style="color: #339933;">;</span><br />
i <span style="color: #339933;">+=</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
Serial.<span style="color: #202020;">print</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;A&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p><strong><em>Arduino Serial</em></strong></p>
<p>On the Arduino side, you have to use some form of Software Serial that sends and receives data on Pins 2/3. I have found that the Adafruit SoftSerial Library, &#8220;AFSoftSerial.h&#8221;, works the best. It seems to be reliable and produce consistent results when talking to the TouchShield Slide. Reading and writing from a software  serial buffer is about the same as a hardware one with this library.</p>
<p>To use software serial, follow these steps:</p>
<ul>
<li>Include the &#8220;AFSoftSerial.h&#8221; library in your Arduino code header space</li>
<li>Define the RX and TX pins</li>
<li>Instantiate the software serial</li>
<li>Initiate the software serial line</li>
</ul>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">#include &lt;AFSoftSerial.h&gt;</span><br />
<br />
<span style="color: #339933;">#define RX_PIN &nbsp;3</span><br />
<span style="color: #339933;">#define TX_PIN &nbsp;2</span><br />
<br />
AFSoftSerial touchSerial <span style="color: #339933;">=</span> &nbsp;AFSoftSerial<span style="color: #009900;">&#40;</span>RX_PIN<span style="color: #339933;">,</span> TX_PIN<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
touchSerial.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">9600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><em><strong>Demo Project</strong></em></p>
<p>I took a moment to put together all of the things that I learned into a quick demo project. This project displays a random number on the screen. The random number is being generated by an Arduino, sent via serial, and requested by a touch of the TouchShield Slide.</p>
<p>Visit Liquidware&#8217;s <a title="Liquidware App Store" href="http://www.liquidware.com/apps/show/80" target="_blank">App Store</a> to download the source code and library for this demo project.</p>
<div id="attachment_122" class="wp-caption aligncenter" style="width: 506px"><a title="Download the project source code from the app store liquidware.com" href="http://www.liquidware.com/apps/show/80" target="_blank"><img class="size-full wp-image-122 " title="Random Number from Arduino Displayed after Detecting a Touch" src="http://iamshadowlord.com/wp-content/uploads/2010/03/Touch.jpg" alt="Random Number from Arduino Displayed after Detecting a Touch" width="496" height="297" /></a><p class="wp-caption-text">Random Number from Arduino Displayed after Detecting a Touch</p></div>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2010/03/touchshield-slide-two-way-communications.html/feed</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>iTurn &#8211; iPhone and iPod Touch Hack</title>
		<link>http://iamshadowlord.com/2008/12/iturn-iphone-and-ipod-touch-hack.html</link>
		<comments>http://iamshadowlord.com/2008/12/iturn-iphone-and-ipod-touch-hack.html#comments</comments>
		<pubDate>Fri, 26 Dec 2008 07:30:00 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[iobridge]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[servo]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=18</guid>
		<description><![CDATA[Since my toaster has been on the Internet Twittering my toasting habits, I have been flooded with email asking what I was going to do next. To be fair, most of the email suggested that I had too much time on my hands. My mom got me an iPod Touch for Christmas (she gave it [...]]]></description>
			<content:encoded><![CDATA[<p>Since my <a href="http://www.iamshadowlord.com/2008/12/social-networking-for-my-toaster.html">toaster</a> has been on the Internet <a href="http://www.twitter.com/mytoaster">Twittering</a> my toasting habits, I have been flooded with email asking what I was going to do next. To be fair, most of the email suggested that I had too much time on my hands. My mom got me an iPod Touch for Christmas (she gave it to me a few days early). I have not had the thing out of my sight since she surprised me with a wonderful gift. She also gave me Batman which I transfered to the iPod. I turned the screen about 44 times a minute while watching The Joker and The Dark Knight try to out smart each other. This got me thinking, &#8220;Could I control a motor with the movement of the iPod?&#8221; I had my next hack.</p>
<p>The iPhone or iPod Touch has an accelerometer that detects how the device is oriented. As the devices moves off axis (from straight up and down) the screen rotates. I want to use that feedback to control the position of a motor or servo or cause specific events to happen depending on the device&#8217;s position.</p>
<p>Taking the <a href="http://www.iobridge.com/store">ioBridge IO-204 module</a>, I connected the servo controller and a servo to one of the channels. On the servo I taped a Best Western hotel pen to show the movement of the servo. I found from hours of testing that the Best Western worked the &#8220;Best&#8221; and Hampton Inn worked slightly worse.</p>
<p><a href="http://www.iamshadowlord.com/uploaded_images/iTurn-Setup.jpg"><img style="margin: 0px auto 10px; display: block; width: 400px; height: 317px; text-align: center;" src="http://www.iamshadowlord.com/uploaded_images/iTurn-Setup-706413.jpg" border="0" alt="iTurn setup" /></a></p>
<p>On the ioBridge website, I created 3 widgets that corresponded with the orientation of the iPod. &#8220;Left&#8221; for when tilted towards the left, &#8220;Right&#8221; when I turned right, and &#8220;Forward&#8221; when I was holding the iPod normally (straight up and down).</p>
<p><img style="margin: 0px auto 10px; display: block; width: 145px; height: 90px; text-align: center;" src="http://www.iamshadowlord.com/uploaded_images/iTurn-Screen-756686.jpg" border="0" alt="iTurn Widgets and Screen Shot" /></p>
<p><span style="color: #ff0000;">Warning: The next part involves some light programming.</span> I made a quick HTML file with some JavaScript that detected the orientation of the iPod and called the appropriate widget. The orientation code is below for those of you that are interested in trying this for yourself:</p>
<p><span style="font-family: courier new;"> </span></p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:580px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> updateOrientation<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000066; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">orientation</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">:</span> widgetExecute<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Upright Widget ID&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">90</span><span style="color: #339933;">:</span> widgetExecute<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Right Widget ID&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000066; font-weight: bold;">case</span> <span style="color: #CC0000;">90</span><span style="color: #339933;">:</span> widgetExecute<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Left Widget ID&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
<p><span class="Apple-style-span" style="font-family: arial;">Load up the completed HTML file on your iPhone or iPod Touch and now you can control a servo with the turning of your iPhone. I call it &#8220;iTurn&#8221; (didn&#8217;t see that one coming, did you?).</span></p>
<p><span class="Apple-style-span" style="font-family: arial;">Here is a </span><a href="http://www.youtube.com/watch?v=KI8siN6EIZ8"><span class="Apple-style-span" style="font-family: arial;">YouTube video</span></a><span class="Apple-style-span" style="font-family: arial;"> of the iTurn project:</span></p>
<p><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/KI8siN6EIZ8&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/KI8siN6EIZ8&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2008/12/iturn-iphone-and-ipod-touch-hack.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Social Networking for My Toaster</title>
		<link>http://iamshadowlord.com/2008/12/social-networking-for-my-toaster.html</link>
		<comments>http://iamshadowlord.com/2008/12/social-networking-for-my-toaster.html#comments</comments>
		<pubDate>Mon, 08 Dec 2008 02:53:00 +0000</pubDate>
		<dc:creator>Hans</dc:creator>
				<category><![CDATA[MyToaster]]></category>
		<category><![CDATA[i/o]]></category>
		<category><![CDATA[input/output]]></category>
		<category><![CDATA[iobridge]]></category>
		<category><![CDATA[my toaster]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[ubernote]]></category>

		<guid isPermaLink="false">http://iamshadowlord.com/?p=16</guid>
		<description><![CDATA[My Toaster Twitters That statement sounds odd. Well, let me explain. My friends would describe me as the kind of person that has a lot of time on their hands. They would be right. That time is never put to productive use, but over Thanksgiving I got the gumption to start a new project. Sometimes, [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: bold; font-size: 130%;">My Toaster Twitters</span></p>
<p>That statement sounds odd. Well, let me explain. My friends would describe me as the kind of person that has a lot of time on their hands. They would be right. That time is never put to productive use, but over Thanksgiving I got the gumption to start a new project. Sometimes, I start little servo, robotic, web-based projects for my own gratification, but I get fed up with all of the time I invest just so I can impress my 3 friends that also have nothing do to over the holidays.</p>
<p>My friend Jason Winters has been working on an module that simplifies the connecting of projects to the internet. He sent me one of his <a href="http://www.iobridge.com/store">ioBridge modules</a> to beta test and my mind started spinning. My goal this Thanksgiving was to think of a crazy project that would be the most senseless thing someone has ever heard of before.</p>
<p><span style="font-weight: bold; font-size: 130%;">Again, My Toaster Twitters&#8230;</span></p>
<p>Twitter is a social networking site that allows you to tell the world your current status &#8211; kind of like a microscopic blog that gets to the point. You can write, &#8220;Hans is going to lunch&#8221; or &#8220;Hans is tired&#8221;, etc. It&#8217;s fun to follow people and see what they can do creatively with just a few characters of updates.</p>
<p>I use my toaster when I am home and I thought that the world may want to know when I&#8217;m toasting.</p>
<div style="text-align: center;"><a href="http://www.twitter.com/mytoaster" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0px auto 10px; display: block; width: 320px; cursor: pointer; height: 202px; text-align: center;" src="http://www.iamshadowlord.com/uploaded_images/TwitterScreenShot2-789014.jpg" border="0" alt="" /></a></div>
<div style="text-align: center;"><a href="http://www.twitter.com/mytoaster">twitter.com/mytoaster</a><br />
<span style="font-weight: bold; font-size: 130%;"><br />
</span></p>
<div style="text-align: center;">
<div style="text-align: left;"><span style="font-weight: bold; font-size: 130%;">How do you make a toaster twitter?</span></div>
<div style="text-align: left;">I grabbed my old bagel / toast toaster and glued a switch to the outside, so when the slider gets pressed down it triggers the switch and when it pops up, the switch opens (couldn&#8217;t be any more binary then that).</div>
<p><a href="http://www.iamshadowlord.com/uploaded_images/ToastingPosition-760353.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0px auto 10px; display: block; width: 320px; cursor: pointer; height: 240px; text-align: center;" src="http://www.iamshadowlord.com/uploaded_images/ToastingPosition-760344.jpg" border="0" alt="" /></a></p>
<div style="text-align: left;">The ioBridge module has a digital input that I can hook the switch up to and monitor that state of toasting or not. Using a terminal board, a pull up resistor (1k), and some alligator clips, I hooked up the resistor from the digital input to the +5v source from the module, and clipped my clips on the resistor and the ground. A few pictures are worth more than my description.</div>
<p><a href="http://www.iamshadowlord.com/uploaded_images/HookupCloseUp-775018.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0px auto 10px; display: block; width: 320px; cursor: pointer; height: 240px; text-align: center;" src="http://www.iamshadowlord.com/uploaded_images/HookupCloseUp-775005.jpg" border="0" alt="" /></a><br />
<a href="http://www.iamshadowlord.com/uploaded_images/ModuleHookup-767522.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0px auto 10px; display: block; width: 320px; cursor: pointer; height: 240px; text-align: center;" src="http://www.iamshadowlord.com/uploaded_images/ModuleHookup-767487.jpg" border="0" alt="" /></a></p>
<div style="text-align: left;">Here is the whole system hooked together:</div>
<p><a href="http://www.iamshadowlord.com/uploaded_images/TwitterToasterSystem-721772.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0px auto 10px; display: block; width: 320px; cursor: pointer; height: 260px; text-align: center;" src="http://www.iamshadowlord.com/uploaded_images/TwitterToasterSystem-721764.jpg" border="0" alt="" /></a></p>
<div style="text-align: left;"><span style="font-size: 130%;"><span style="font-weight: bold;">The Web Stuff</span></span></div>
<div style="text-align: left;">Using the ioBridge website, I created an event widget that monitors the input state of that particular digital input. And when the input is &#8220;high&#8221;, the site sends an email to any address of my liking. And the same for the &#8220;low&#8221; state. I chose my <a href="http://www.twittermail.com/" target="_blank">Twitter Mail</a> address, but really could of hit any social network, email by blog, or even UberNote.</div>
<div style="text-align: center;"><a href="http://www.twitter.com/mytoaster" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0px auto 10px; display: block; width: 320px; cursor: pointer; height: 202px; text-align: center;" src="http://www.iamshadowlord.com/uploaded_images/TwitterScreenShot2-789014.jpg" border="0" alt="" /></a></div>
<div style="text-align: left;">Follow My Toaster on Twitter at <a href="http://www.twitter.com/mytoaster">twitter.com/mytoaster</a>. I think I proved empirically that I have too much time on my hands.</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://iamshadowlord.com/2008/12/social-networking-for-my-toaster.html/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

