<?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>Brett&#039;s Build Log &#187; python</title>
	<atom:link href="http://brettinman.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://brettinman.com</link>
	<description>Hardware tinkering with the occasional bit of software</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:24:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Woot-Off Lights &#8211; in Python</title>
		<link>http://brettinman.com/2009/06/03/woot-off-lights-in-python/</link>
		<comments>http://brettinman.com/2009/06/03/woot-off-lights-in-python/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 01:07:56 +0000</pubDate>
		<dc:creator>brettinman</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Woot-Off Lights Project]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[wootofflights]]></category>

		<guid isPermaLink="false">http://brettinman.com/?p=70</guid>
		<description><![CDATA[The Woot-Off Lights project continues to slowly progress. Over the weekend we moved over to Python for the coding, since that&#8217;s the language Alex is most familiar with right now (especially in networking). Serial control of the lights in Python took longer than expected &#8211; we could have saved over an hour of troubleshooting had [...]]]></description>
			<content:encoded><![CDATA[<p>The Woot-Off Lights project continues to slowly progress. Over the weekend we moved over to Python for the coding, since that&#8217;s the language Alex is most familiar with right now (especially in networking). </p>
<p>Serial control of the lights in Python took longer than expected &#8211; we could have saved over an hour of troubleshooting had we simply waited two seconds between opening the serial connection and transmitting the first byte (allowing the connection protocols time to complete), but instead we tried half a dozen Python libraries, thinking the problem was somewhere in the code library. Lesson learned &#8211; the exact specifics of interaction between software and hardware is not to be ignored.</p>
<p>We then were able to force the Woot Tracker to update it&#8217;s cache, pull down the XML file generated by the tracker, parse it for the value we are looking for (wootoff, true or false), and take action based upon it. </p>
<p>Now we&#8217;re simply trying to figure out how to package the program into an .exe that can be hidden in the tray, and also figure out how the timing should work &#8211; I would prefer that my server didn&#8217;t get a ton of update requests at the same time, especially during a Woot-Off. Right now it looks like we&#8217;ll run a custom version of the software on our machine to update the tracker, and the software we distribute publicly will simply pull down the XML (without first updating the cache, because our software has already done so).</p>
<p>On the hardware side of things, I&#8217;ve consolidated the driver circuitry onto a small piece of protoboard that pops into the Arduino like a shield. I&#8217;ve also cut up an Altoids tin and housed the assembly inside of it. Don&#8217;t forget the isolate the top/bottom of the board with electrical tape or similar so the metal case doesn&#8217;t short anything.</p>
<p>Here&#8217;s a few pictures of the assembly, with the lights being controlled via the Python application.</p>
<p style="text-align: center;">
<div class="ngg-galleryoverview" id="ngg-gallery-1-70">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-1" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://brettinman.com/blog/wp-content/gallery/tin/tin1.jpg" title=" " rel="lightbox[set_1]" >
								<img title="tin1.jpg" alt="tin1.jpg" src="http://brettinman.com/blog/wp-content/gallery/tin/thumbs/thumbs_tin1.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-2" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://brettinman.com/blog/wp-content/gallery/tin/tin2.jpg" title=" " rel="lightbox[set_1]" >
								<img title="tin2.jpg" alt="tin2.jpg" src="http://brettinman.com/blog/wp-content/gallery/tin/thumbs/thumbs_tin2.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://brettinman.com/blog/wp-content/gallery/tin/tin3.jpg" title=" " rel="lightbox[set_1]" >
								<img title="tin3.jpg" alt="tin3.jpg" src="http://brettinman.com/blog/wp-content/gallery/tin/thumbs/thumbs_tin3.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

</p>
]]></content:encoded>
			<wfw:commentRss>http://brettinman.com/2009/06/03/woot-off-lights-in-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
