<?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>Hive76 &#187; Code</title>
	<atom:link href="http://www.hive76.org/category/code/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hive76.org</link>
	<description>Making Things Awesome, Making Awesome Things</description>
	<lastBuildDate>Sat, 08 Jun 2013 01:02:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Hive to HOST Bug Jam March 4th</title>
		<link>http://www.hive76.org/hive-to-host-bug-jam-march-4th</link>
		<comments>http://www.hive76.org/hive-to-host-bug-jam-march-4th#comments</comments>
		<pubDate>Tue, 14 Feb 2012 16:09:58 +0000</pubDate>
		<dc:creator>Jim Fisher</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Instructionals]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=3329</guid>
		<description><![CDATA[What the heck is a Bug Jam? README Ok, so now what? &#160; From Friday March 2nd to Sunday March 4th in IRC at #ubuntu-us-pa on freenode we will be working as a group to help with this event. On Sunday March 4th from 10am to 6pm at Hive76 we will have a Bug Event. If [...]]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter" src="https://wiki.ubuntu.com/UbuntuGlobalJam/Artwork?action=AttachFile&amp;do=get&amp;target=button_orange_250x148_en.png" alt="" width="250" height="148" /></p>
<p>What the heck is a Bug Jam?</p>
<p><a href="https://wiki.ubuntu.com/UbuntuGlobalJam?" target="_blank">README</a></p>
<p>Ok, so now what?</p>
<p>&nbsp;</p>
<p><span id="more-3329"></span></p>
<p>From Friday March 2nd to Sunday March 4th in IRC at #ubuntu-us-pa on<br />
freenode we will be working as a group to help with this event.</p>
<p>On Sunday March 4th from 10am to 6pm at<br />
<a href="http://wiki.hive76.org/About_Us" target="_blank">Hive76</a> we will have a Bug Event.</p>
<p>If you can get out and join us, please do! No experience necessary.</p>
<p>Heck, even if you want to just hangout, stop on by.</p>
<p><a href="http://loco.ubuntu.com/events/pennsylvania/1502/detail/" target="_blank">Event info and Registration</a></p>
<p><img class="aligncenter" src="https://wiki.ubuntu.com/UbuntuGlobalJam/Artwork?action=AttachFile&amp;do=get&amp;target=ugj09_banner_195x500_yellow_EN.png" alt="" width="195" height="500" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/hive-to-host-bug-jam-march-4th/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Feb 22nd: Meet the Developers of Apostrophe Now!</title>
		<link>http://www.hive76.org/feb-22nd-meet-the-developers-of-apostrophe-now</link>
		<comments>http://www.hive76.org/feb-22nd-meet-the-developers-of-apostrophe-now#comments</comments>
		<pubDate>Wed, 08 Feb 2012 12:14:01 +0000</pubDate>
		<dc:creator>jmil</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Instructionals]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=3303</guid>
		<description><![CDATA[Apostrophe Now! &#8212; based out of Philadelphia and developed by P&#8217;unk Ave &#8212; is &#8220;a content management system designed for maximum flexibility with a minimal learning curve. The interface is ergonomic, all content-editing is performed in-context.&#8221; Do you have or are you building a website, but you are looking for alternatives to WordPress, Django and [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.hive76.org/wp-content/uploads/2012/02/ApostropheNow.png"><img src="http://www.hive76.org/wp-content/uploads/2012/02/ApostropheNow.png" alt="" title="ApostropheNow!" width="242" height="361" class="alignright size-full wp-image-3309" /></a></p>
<p><a href="http://apostrophenow.org/" target="_blank">Apostrophe Now!</a> &#8212; <strong>based out of Philadelphia</strong> and developed by <a href="http://punkave.com/" target="_blank">P&#8217;unk Ave</a> &#8212; is &#8220;a content management system designed for maximum flexibility with a minimal learning curve. The interface is ergonomic, all content-editing is performed in-context.&#8221;</p>
<p>Do you have or are you building a website, but you are looking for alternatives to <a href="http://wordpress.com/" target="_blank">WordPress</a>, <a href="https://www.djangoproject.com/" target="_blank">Django</a> and other <a href="http://en.wikipedia.org/wiki/List_of_content_management_systems" target="_blank">CMS engines</a>? Apostrophe may be right for you!</p>
<p>Come meet Geoff DiMasi and Tom Boutell, two of the lead developers, and find out all the nitty gritty about <a href="http://apostrophenow.org/" target="_blank">Apostrophe</a>. They&#8217;ll give an overview of the system, design goals, and features, and they&#8217;ll also dive into the code to show us how it&#8217;s all put together. Geoff and Tom will also talk about other things Philadelphia (the founding of <a href="http://punkave.com/" target="_blank">P&#8217;unk Ave</a>, the founding of <a href="http://indyhall.org/" target="_blank">Indy Hall</a>, and the founding of <a href="http://www.ignitephilly.org/" target="_blank">Ignite Philly</a>).</p>
<p>You won&#8217;t find this info on Youtube or Vimeo. Come on down to your favorite hackerspace to learn all about Apostrophe and an awesome Philadelphia success story.</p>
<p>Hive76<br />
Wednesday, February 22nd, 7:30 pm<br />
915 Spring Garden, Suite 519</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/feb-22nd-meet-the-developers-of-apostrophe-now/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The JayOscillator</title>
		<link>http://www.hive76.org/the-jayoscillator</link>
		<comments>http://www.hive76.org/the-jayoscillator#comments</comments>
		<pubDate>Fri, 13 Jan 2012 13:00:20 +0000</pubDate>
		<dc:creator>Sean McBeth</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Cool Projects]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=3174</guid>
		<description><![CDATA[The JayOscillator is the stupid name that I came up with for my HTML 5 synthesizer that I&#8217;ve been working on over the last month or so.  I spent a good part of today making it look pretty, though now It works in Chrome and Safari right now. It technically works in FireFox, but the [...]]]></description>
				<content:encoded><![CDATA[<p>The JayOscillator is the stupid name that I came up with for my HTML 5 synthesizer that I&#8217;ve been working on over the last month or so.  I spent a good part of today making it look pretty, though now It works in Chrome and Safari right now. It technically works in FireFox, but the displays for the variables don&#8217;t seem to want to open their eyes. Take a look:</p>
<div id="attachment_3177" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.hive76.org/wp-content/uploads/2012/01/screenie2.png"><img class="size-medium wp-image-3177" title="screenie" src="http://www.hive76.org/wp-content/uploads/2012/01/screenie2-300x155.png" alt="" width="300" height="155" /></a><p class="wp-caption-text">The JayOscillator</p></div>
<p>I named it the &#8220;JayOscillator&#8221; after the <a href="http://www.youtube.com/watch?v=BW7y5Q5j8VA&amp;feature=related">Korg KAOSCILLATOR</a>, as my thing is a similar sort of notion, written in JavaScript.</p>
<p>You can try it out <a href="http://dl.dropbox.com/u/9161524/synth/audio.html">here</a> for now, though no promises that the URL won&#8217;t change in the future.</p>
<p>Unfortunately, I think I have to give up on iPad support. Apple nerfed the ability to auto-start HTML 5 audio tags from JavaScript. Without that ability, their is no way I can keep a continuous tone going.</p>
<p>I&#8217;m considering rewriting this as a native app, though. Most of the effort here has been in figuring out the math necessary to get this going. Since that work is done, porting to different languages and platforms is more of a chore in API calls.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/the-jayoscillator/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maker Collider Event with NextFab Studio: TUESDAY</title>
		<link>http://www.hive76.org/maker-collider-event-with-nextfab-studio-tuesday</link>
		<comments>http://www.hive76.org/maker-collider-event-with-nextfab-studio-tuesday#comments</comments>
		<pubDate>Mon, 19 Dec 2011 05:54:26 +0000</pubDate>
		<dc:creator>jmil</dc:creator>
				<category><![CDATA[3D Printing]]></category>
		<category><![CDATA[artists]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Cool Projects]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[Hackerspaces]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Instructionals]]></category>
		<category><![CDATA[kinetic art]]></category>
		<category><![CDATA[Making Makers]]></category>
		<category><![CDATA[Organization]]></category>
		<category><![CDATA[Philadelphia]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=3033</guid>
		<description><![CDATA[Join us on TUESDAY, December 20th, 7 pm &#8211; Midnight Meet-and-Make, Hive76 and NextFab Studio Members @ http://NextFabStudio.com/ @ 3711 Market Street This &#8220;Maker Collider&#8221; event will be a great opportunity to make awesome stuff. We had proposed these projects: All details are here on the Wiki After reviewing the projects here and those proposed [...]]]></description>
				<content:encoded><![CDATA[<div class="wp-caption alignright" style="width: 210px"><a href="http://wiki.hive76.org/index.php?title=OpenHouseAtNextFabStudio#Proposal_3_by_Eagleapex"><img alt="Option 1) Lasercut, Laser engrave, and LED-light-up your very own Snowflake" src="http://wiki.hive76.org/images/1/1d/Snowflake.jpg" title="Snowflake" width="200" /></a><p class="wp-caption-text">Option 1) Lasercut, Laser engrave, and LED-light-up your very own Snowflake</p></div>
<p>Join us on TUESDAY, December 20th, 7 pm &#8211; Midnight</p>
<p>Meet-and-Make, Hive76 and NextFab Studio Members<br />
@ <a href="http://www.NextFabStudio.com/" title="NextFabStudio" target="_blank">http://NextFabStudio.com/</a> @ 3711 Market Street</p>
<p>This &#8220;Maker Collider&#8221; event will be a great opportunity to make awesome stuff.</p>
<p>We had proposed these projects:<br />
<a href="http://wiki.hive76.org/OpenHouseAtNextFabStudio " title="Open House at NextFab Studio">All details are here on the Wiki</a></p>
<p>After reviewing the projects here and those proposed by NextFab members it sounds like we will be doing some form of the Chess boards, the snowflakes, some robotics, and a bunch of laser-engraving. But what if you don&#8217;t like those? Come by anyway and you can rally troops for helping you on your own project(s).</p>
<p>NextFab Studio will have these staff members on hand throughout the event:<br />
Chrinstine : Textile and Industrial Design ( fabric knowledge, product design,cad, sewing )<br />
Ian : Electronics (pcb design/fabrication, coding, wiring, soldering, etc.)<br />
Seth : Mechanical Engineer (handtools, cad, product design)<br />
Brandon : Multi-Media Designer ( 3d printing, graphic design, product design, cinematography, cad)</p>
<p>Anything you want to do, you can do. AWESOME.</p>
<p><a href="http://www.nextfabstudio.com/about/equipment-list" title="NextFabStudio Equipment" target="_blank">Check out all their equipment.</a></p>
<p>Oh, and there will be food too. Be there at 7 pm!!</p>
<p><a href="http://groups.google.com/group/hive76-discussion" title="Join our mailing list" target="_blank">To Join in on the Discussion, please join our mailing list</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/maker-collider-event-with-nextfab-studio-tuesday/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monthly Monday Microcontroller Madness: Motors!</title>
		<link>http://www.hive76.org/monthly-monday-microcontroller-madness-motors</link>
		<comments>http://www.hive76.org/monthly-monday-microcontroller-madness-motors#comments</comments>
		<pubDate>Fri, 09 Sep 2011 16:47:26 +0000</pubDate>
		<dc:creator>pez</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[artists]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[kinetic art]]></category>
		<category><![CDATA[MSP430]]></category>
		<category><![CDATA[Study Groups]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=2738</guid>
		<description><![CDATA[After speaking to a few folks that expressed an interest in the MMMM workshop, it became apparent (a) most folks were newbs who want to learn the basics and (b) everyone wants to control motors.  Excellent!  We&#8217;ll do that. Although motor control is potentially a vast and complex topic, with highly specialized branches, the basics [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="420" height="345" src="http://www.youtube.com/embed/XQgIEHk7aqo" frameborder="0" allowfullscreen></iframe><br />
After speaking to a few folks that expressed an interest in the MMMM workshop, it became apparent (a) most folks were newbs who want to learn the basics and (b) everyone wants to control motors.  Excellent!  We&#8217;ll do that.</p>
<p>Although motor control is potentially a vast and complex topic, with highly specialized branches, the basics are fairly easy to learn &#8212; and they&#8217;ll take you pretty far.   So &#8230; we&#8217;ll be prepared to present the following items:</p>
<ul>
<li>DC motors</li>
<li>H-bridge circuits &#8212; these let puny microcontrollers run fairly powerful motors</li>
<li>Stepper motors &#8212; just a little more complex to program than DC motors and they use H-bridge circuits too</li>
<li>Quadrature Encoders &#8212; these are a  simple and accurate way to read the position of something</li>
</ul>
<p>We&#8217;ll also try to discuss some organizational items &#8212; like the logistics of future workshops and the use of the MMMM GitHub, so that we can build up assets collectively, share them with the world and manage changes and contributions in a free-and-easy-but-organized way.</p>
<p>If you are coming , please bring:</p>
<ul>
<li>Yourself &#8212; If you&#8217;re a newb, welcome &#8212; If you&#8217;re an MCU Yoda, then attend you must and wisdom to newbs impart</li>
<li>Some ideas</li>
<li>A laptop if you have one</li>
<ul>
<li>You may want to install VMWare Player or VMWare Fusion before you arrive</li>
</ul>
<li>An MCU development kit if you have one or &#8230;</li>
<li>Some money if you don&#8217;t.  We&#8217;ll have some development kits that you can buy.  Plan on at least $10 for the kits and some parts that you can use for small learning projects.</li>
<li>A bread-board if you want to build some live circuits to keep.  We&#8217;ll have breadboards to loan, but if you want to take one home, it has to be one that arrived with you.</li>
</ul>
<p>That&#8217;s about it &#8212; see you all Monday.  To whet your appetite, there is some prototype code below for reading a quadrature encoded position detector (not really elegant enough for a final effort, but it&#8217;s a start).  We&#8217;ll have you writing stuff like this in no-time.</p>
<p><span id="more-2738"></span></p>
<p>This code is part of an effort to turn salvaged InkJet printers into motion controllers.  Most of these positioners let you position an InkJet head to within 1/600 inch &#8212; they&#8217;re fast, accurate, compact, surprisingly strong &#8230; and dirt-cheap.</p>
<pre>#include  <span style="color: blue; font-size: xx-small;">&lt;</span>msp430x20x2.h<span style="color: blue; font-size: xx-small;">&gt;</span>

#define LED0 BIT0
#define LED1 BIT6
#define PHASE1 BIT1
#define PHASE2 BIT2
#define PHASE_MASK <span style="color: brown;">6</span>
#define PHASE_SHIFT <span style="color: brown;">1</span>

<span style="color: red;"><strong>int</strong></span> state<span style="color: blue; font-size: xx-small;"><strong>;</strong></span>     <span style="color: green;"><em>// used to hold current state of encoder bits (00, 01, 10 or 11) </em></span><span style="color: red;"><strong>
int</strong></span> lastState<span style="color: blue; font-size: xx-small;"><strong>;</strong></span><span style="color: green;"><em> // used to hold previous state of encoder bits (00, 01, 10 or 11) 
</em></span><span style="color: red;"><strong>int</strong></span> pos<span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em> // used to count steps. A 1/150" encoder (the most common kind) yields 600 steps per inck. </em></span>

<span style="color: green;"><em>// -- prototype of common bit of code used to compute the present state value </em></span><span style="color: red;"><strong>
void</strong></span> updateState<span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: red;"><strong>void</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span>

<span style="color: red;"><strong>int</strong></span> main<span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: red;"><strong>void</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span>
<span style="color: blue; font-size: xx-small;"><strong>{</strong></span>
	WDTCTL <span style="color: blue; font-size: xx-small;">=</span> WDTPW <span style="color: blue; font-size: xx-small;">+</span> WDTHOLD<span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// Stop watchdog timer </em></span>
	<span style="color: green;"><em>// --- set up some initial values </em></span>	
        pos <span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">0</span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span>
	P1DIR <span style="color: blue; font-size: xx-small;">&amp;</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: blue; font-size: xx-small;">~</span><span style="color: blue; font-size: xx-small;"><strong>(</strong></span>PHASE1 <span style="color: blue; font-size: xx-small;">+</span> PHASE2<span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// Set P1.1 and P1.2 as inputs </em></span>	
        P1DIR <span style="color: blue; font-size: xx-small;">|</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: blue; font-size: xx-small;"><strong>(</strong></span>LED0 <span style="color: blue; font-size: xx-small;">+</span> LED1<span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// Set P1.0 and P1.6 to outputs. These are the LEDs on a LaunchPad. 

</em></span>	<span style="color: green;"><em>// --- get initial conditions so that the first interrupt </em></span>	<span style="color: green;"><em>
 // has the right "edge" values and so that position calculations are based on feasible transitions </em></span>	
        updateState<span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span>
	lastState <span style="color: blue; font-size: xx-small;">=</span> state<span style="color: blue; font-size: xx-small;"><strong>;</strong></span>

	P1IFG <span style="color: blue; font-size: xx-small;">&amp;</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: blue; font-size: xx-small;">~</span><span style="color: blue; font-size: xx-small;"><strong>(</strong></span>PHASE1 <span style="color: blue; font-size: xx-small;">|</span> PHASE2<span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// clear interrupt flags for P1.1 and P1.2 </em></span>	
        P1IE <span style="color: blue; font-size: xx-small;">|</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: blue; font-size: xx-small;"><strong>(</strong></span>PHASE1 <span style="color: blue; font-size: xx-small;">|</span> PHASE2<span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// P1.1 and P1.2 interrupt enabled </em></span>
	__enable_interrupt<span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// enable all interrupts </em></span>	<span style="color: red;"><strong>
 for</strong></span><span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span>
	<span style="color: blue; font-size: xx-small;"><strong>{</strong></span> <span style="color: green;"><em>/* just loop forever and let the interrupts do all the work */</em></span> <span style="color: blue; font-size: xx-small;"><strong>}</strong></span>
<span style="color: blue; font-size: xx-small;"><strong>}</strong></span>

<span style="color: green;"><em>// updateState() calculates updates for the edge detectors used in the interrupts </em></span><span style="color: green;"><em>
// and also updates the "lastState" variable 
</em></span><span style="color: red;"><strong>void</strong></span> updateState<span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: red;"><strong>void</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>{</strong></span>
	state <span style="color: blue; font-size: xx-small;">=</span> P1IN <span style="color: blue; font-size: xx-small;">&amp;</span> PHASE_MASK<span style="color: blue; font-size: xx-small;"><strong>;</strong></span>

	<span style="color: red;"><strong>if</strong></span> <span style="color: blue; font-size: xx-small;"><strong>(</strong></span>state <span style="color: blue; font-size: xx-small;">&amp;</span> PHASE1<span style="color: blue; font-size: xx-small;"><strong>)</strong></span>
		P1IES <span style="color: blue; font-size: xx-small;">|</span><span style="color: blue; font-size: xx-small;">=</span> PHASE1<span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// PHASE1 high, then interrupt on falling edge </em></span>	
        <span style="color: red;"><strong>else</strong></span>
		P1IES <span style="color: blue; font-size: xx-small;">&amp;</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: blue; font-size: xx-small;">~</span>PHASE1<span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// PHASE1 low, then interrupt on rising edge </em></span>
	<span style="color: red;"><strong>if</strong></span> <span style="color: blue; font-size: xx-small;"><strong>(</strong></span>state <span style="color: blue; font-size: xx-small;">&amp;</span> PHASE2<span style="color: blue; font-size: xx-small;"><strong>)</strong></span>
		P1IES <span style="color: blue; font-size: xx-small;">|</span><span style="color: blue; font-size: xx-small;">=</span> PHASE2<span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// PHASE2 high, then interrupt on falling edge </em></span>	
        <span style="color: red;"><strong>else</strong></span>
		P1IES <span style="color: blue; font-size: xx-small;">&amp;</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: blue; font-size: xx-small;">~</span>PHASE2<span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// PHASE2 low, then interrupt on rising edge </em></span>

	<span style="color: green;"><em>// ---"right-justify" state so that it is in the range 0..3</em></span>	
       state <span style="color: blue; font-size: xx-small;">=</span>  <span style="color: blue; font-size: xx-small;"><strong>(</strong></span>state <span style="color: blue; font-size: xx-small;">&gt;</span><span style="color: blue; font-size: xx-small;">&gt;</span> PHASE_SHIFT<span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span>
<span style="color: blue; font-size: xx-small;"><strong>}</strong></span>

<span style="color: green;"><em>// Port 1 interrupt service routine </em></span>#pragma vector<span style="color: blue; font-size: xx-small;">=</span>PORT1_VECTOR
__interrupt <span style="color: red;"><strong>void</strong></span> Port_1<span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: red;"><strong>void</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span>
<span style="color: blue; font-size: xx-small;"><strong>{</strong></span>
    updateState<span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span>

    <span style="color: green;"><em>// --- test for all clockwise incremental cases </em></span>    <span style="color: green;"><em> 
 // if we stepped clockwise, then increment the position </em></span>    
    <span style="color: red;"><strong>if</strong></span> <span style="color: blue; font-size: xx-small;"><strong>(</strong></span> <span style="color: blue; font-size: xx-small;"><strong>(</strong></span>lastState <span style="color: blue; font-size: xx-small;">=</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">0</span> <span style="color: blue; font-size: xx-small;">&amp;</span> state <span style="color: blue; font-size: xx-small;">=</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">2</span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span>
       <span style="color: blue; font-size: xx-small;"><span style="color: blue; font-size: xx-small;">|</span><span style="color: blue; font-size: xx-small;">|</span></span><span style="color: blue; font-size: xx-small;"><strong>(</strong></span>lastState <span style="color: blue; font-size: xx-small;">=</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">2</span> <span style="color: blue; font-size: xx-small;">&amp;</span> state <span style="color: blue; font-size: xx-small;">=</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">3</span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span>
       <span style="color: blue; font-size: xx-small;"><span style="color: blue; font-size: xx-small;">|</span><span style="color: blue; font-size: xx-small;">|</span></span><span style="color: blue; font-size: xx-small;"><strong>(</strong></span>lastState <span style="color: blue; font-size: xx-small;">=</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">3</span> <span style="color: blue; font-size: xx-small;">&amp;</span> state <span style="color: blue; font-size: xx-small;">=</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">1</span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span>
       <span style="color: blue; font-size: xx-small;"><span style="color: blue; font-size: xx-small;">|</span><span style="color: blue; font-size: xx-small;">|</span></span><span style="color: blue; font-size: xx-small;"><strong>(</strong></span>lastState <span style="color: blue; font-size: xx-small;">=</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">1</span> <span style="color: blue; font-size: xx-small;">&amp;</span> state <span style="color: blue; font-size: xx-small;">=</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: brown;">0</span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>{</strong></span>
         pos<span style="color: blue; font-size: xx-small;"><span style="color: blue; font-size: xx-small;">+</span><span style="color: blue; font-size: xx-small;">+</span></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span>
    <span style="color: blue; font-size: xx-small;"><strong>}</strong></span>
    <span style="color: green;"><em>// --- If we didn't move clockwise, then we must have moved counter-clockwise </em></span>    <span style="color: green;"><em>
 // so decrement the position </em></span>    
    <span style="color: red;"><strong>else</strong></span><span style="color: blue; font-size: xx-small;"><strong>{</strong></span>
        pos<span style="color: blue; font-size: xx-small;"><span style="color: blue; font-size: xx-small;">-</span><span style="color: blue; font-size: xx-small;">-</span></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span>
    <span style="color: blue; font-size: xx-small;"><strong>}</strong></span>

    <span style="color: green;"><em>// --- record last state </em></span>    
    lastState <span style="color: blue; font-size: xx-small;">=</span> state<span style="color: blue; font-size: xx-small;"><strong>;</strong></span>

    <span style="color: green;"><em>// --- update LEDs just to help debug </em></span>    
    <span style="color: green;"><em>// use "state" as intermediate variable so that we can see the output value in the debugger easily </em></span>    
    <span style="color: green;"><em>// This is just so that we can see the encoder signal. No functional purpose. </em></span>    
    state <span style="color: blue; font-size: xx-small;">=</span> state <span style="color: blue; font-size: xx-small;">+</span> <span style="color: blue; font-size: xx-small;"><strong>(</strong></span><span style="color: blue; font-size: xx-small;"><strong>(</strong></span>state <span style="color: blue; font-size: xx-small;">&lt;</span><span style="color: blue; font-size: xx-small;">&lt;</span> <span style="color: brown;">5</span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span> <span style="color: blue; font-size: xx-small;">&amp;</span> <span style="color: pink;">0x40</span><span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span>
    P1OUT <span style="color: blue; font-size: xx-small;">=</span> state<span style="color: blue; font-size: xx-small;"><strong>;</strong></span>

    <span style="color: green;"><em>// --- clear the interrupt flags </em></span>    
    P1IFG <span style="color: blue; font-size: xx-small;">&amp;</span><span style="color: blue; font-size: xx-small;">=</span> <span style="color: blue; font-size: xx-small;">~</span><span style="color: blue; font-size: xx-small;"><strong>(</strong></span>PHASE1 <span style="color: blue; font-size: xx-small;">|</span> PHASE2<span style="color: blue; font-size: xx-small;"><strong>)</strong></span><span style="color: blue; font-size: xx-small;"><strong>;</strong></span> <span style="color: green;"><em>// clear interrupt flags for P1.1 and P1.2 </em></span><span style="color: blue; font-size: xx-small;"><strong> 
}</strong></span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/monthly-monday-microcontroller-madness-motors/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>RHOK FTW</title>
		<link>http://www.hive76.org/rhok-ftw</link>
		<comments>http://www.hive76.org/rhok-ftw#comments</comments>
		<pubDate>Wed, 25 May 2011 00:59:48 +0000</pubDate>
		<dc:creator>FarMcKon</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[hackathon]]></category>
		<category><![CDATA[RHOK]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=2358</guid>
		<description><![CDATA[In a week-or-so (Saturday, June 4th) is Random Hacks of Kindness. And what is RHOK? RHoK is a hackathon and competition to create solutions to pressing real world problems. By gathering the brightest hackers and problem-solvers for weekend hack-a-thons, RHoK aims to use technology to tackle disaster relief, social development, climate change, and human rights. [...]]]></description>
				<content:encoded><![CDATA[<p>In a week-or-so (Saturday, June 4th) is Random Hacks of Kindness. </p>
<p>And what is RHOK?  RHoK is a hackathon and competition to create solutions to pressing real world problems.  By gathering the brightest hackers and problem-solvers for weekend hack-a-thons, RHoK aims to use technology to tackle disaster relief, social development, climate change, and human rights. </p>
<p>RHoK Philly begins at 9am on Sat June 4th.  <a href="http://rhokphiladelphia.eventbrite.com">Register a team</a> of 2-4 hackers (or join a team there) and Pick one of the dozens problem-definitions. Then design a solutions, dream/scope/layout and hack at it, and see what you can make by Sunday afternoon.  The best project will be featured around the globe. If you have a global problem to suggest, get involved in the discussion on the RHoK site (http://www.rhok.org) and submit it. </p>
<p>There will also be a keynote talk by Roger Dingledine of the <a href="https://torproject.org">Tor Project</a>  Space is limited so be sure to <a href="http://rhokphiladelphia.eventbrite.com">pre-register</a>.</p>
<p>WHAT: A FREE hackathon to create software solutions to global human challenges.<br />
WHO: Designers, programmers, geeks, hackers, activists, problem solvers and concerned citizens!<br />
WHERE: 3175 JFK Blvd, Drexel University, Philadelphia<br />
WHEN: June 4th and 5th, 2011 starting at 9am. (Reception on June 3rd at WHYY)</p>
<p>Register at <a href="http://rhokphiladelphia.eventbrite.com">http://rhokphiladelphia.eventbrite.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/rhok-ftw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gitmarks 2.0 Alpha</title>
		<link>http://www.hive76.org/gitmarks-2-0-alpha</link>
		<comments>http://www.hive76.org/gitmarks-2-0-alpha#comments</comments>
		<pubDate>Sun, 06 Feb 2011 20:27:32 +0000</pubDate>
		<dc:creator>FarMcKon</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Cool Projects]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[gitmarks]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=1882</guid>
		<description><![CDATA[As rumors of delicio.us shutdown rumbled through the internet, a bunch of geeks in a minor IRC channel started gabbing. They has a lot of info, links, tags, and data stored in delico.us, and were afraid to lose them, syncing, and all other good features. They realized as geeks often do, that if we owned [...]]]></description>
				<content:encoded><![CDATA[<p>As rumors of <a href="http://gorumors.com/is-delicious-com-shutting-down/2757695">delicio.us shutdown</a> rumbled through the internet, a bunch of geeks in a minor IRC channel started gabbing.  They has a lot of info, links, tags, and data stored in delico.us, and were afraid to lose them, syncing, and all other good features.  They realized as geeks often do, that if we owned the service, we wouldn&#8217;t have to worry about outside shutdowns if we had our own service.   Thus <a href="http://hypatia.ca/2010/12/sunsets-arent-delicious/">hypatia</a> spun-up <a href="https://groups.google.com/forum/#!forum/federated-bookmarks">Federated Bookmarks</a> </p>
<p>The first output of this crew is something called <a href="http://github.com/FarMcKon/gitmarks_hm">gitmarks</a>, based on work by <a href="http://www.hilarymason.com/">Hillary Mason (of bit.ly)</a>.  This is a little tool to store bookmarks, bookmark metadata, and page content locally for searching, using, and peer-to-peer sharing.  Since it is based on git this system can use a central server, *or* it can share peer to peer. As the name implies, it uses a git backed for data transfer and versioning. It also has the ability to pull down content for a local cache, and for local searching. </p>
<p>This project is in Alpha, and if you <a href="https://groups.google.com/d/msg/federated-bookmarks/ZTMSSt22c3Q/oOjxCVy2Fc4J">want to  test the silly thing</a>, the basics work.  If you want to help build a cool distributed tool,  we could use some help!  We need to building a server, building more git tools, xmmp messaging, and browser integration.  We also hope to create tools that along the way that make it easy to build systems for <a href="http://yro.slashdot.org/story/10/08/15/2140209/Eben-Moglen-Calls-To-Free-the-Cloud">Moglen Boxen.</a>  Ping FarMcKon@gmail.com, leave a comment here, or hit <a href="http://www.hive76.org/irc"> #hive76 in IRC</a> if you want to help.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/gitmarks-2-0-alpha/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer Project Day (Hackaton) on June 12</title>
		<link>http://www.hive76.org/summer-hackaton-2010</link>
		<comments>http://www.hive76.org/summer-hackaton-2010#comments</comments>
		<pubDate>Wed, 02 Jun 2010 21:56:37 +0000</pubDate>
		<dc:creator>FarMcKon</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Hackaton]]></category>
		<category><![CDATA[Project Day]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=1195</guid>
		<description><![CDATA[Everyone has cool projects they&#8217;ve not finished, or ones they&#8217;ve not made time to start yet. A Project Day (aka Hackaton) is a day to get together with friends, and finally get some of that stuff done. Have art to finish? A kit you want to build? Some software you need help on? Hive76 will [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/opacity/3872572705/sizes/s/"><img src="http://www.hive76.org/wp-content/uploads/2010/06/3872572705_d3f4c9dabb_m.jpg" alt="" title="Hackers and Artists at a hackathon" width="240" height="159" class="alignleft size-full wp-image-1196" /></a>Everyone has cool projects they&#8217;ve not finished, or ones they&#8217;ve not made time to start yet.  A Project Day (aka Hackaton) is a day to get together with friends, and finally get some of that stuff done. Have art to finish? A kit you want to build? Some software you need help on?  Hive76 will be open 10AM to 10PM, so come by and get some quite, some help, and some comradeship as you work on whatever project you&#8217;ve wanted to finish. Little known facts about Hackatons:</p>
<ul>
<li>People being too loud or just socializing will be politely asked to go hang out in the lobby.</li>
<li>Desk-sized whiteboards and some markers will be available to help in brainstorming. </li>
<li>We will have &#8216;quite please&#8217; signs. Feel free to take one if you don&#8217;t want to be interrupted while you work.</li>
<li>If you just want to drop in and help,  Hive76 will find something that fits your talents that can help the community.</li>
<li>A white board will be reserved for anyone to write what they are stuck on, to help people find tutors or helpers. </li>
<li>Lunch will be outside, at about 1PM, for about an hour. Get some sun!</li>
<li>People working on open source projects get free lunch!</li>
</ul>
<p><em>(Photo CC and by <a href="http://www.flickr.com/photos/opacity/">Opacity</a> of <a href="http://pumpingstationone.org/">PS:One</a>)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/summer-hackaton-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Programming on Feb 22nd</title>
		<link>http://www.hive76.org/python-programming-on-feb-22nd</link>
		<comments>http://www.hive76.org/python-programming-on-feb-22nd#comments</comments>
		<pubDate>Sat, 06 Feb 2010 04:25:29 +0000</pubDate>
		<dc:creator>FarMcKon</dc:creator>
				<category><![CDATA[Classes]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Study Groups]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[intro]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=661</guid>
		<description><![CDATA[We are running a workshop on Feb. 22nd about getting started with Python. We will help you get Python installed and setup, and get you working on some great initial projects to get your feet wet. This class is best for people with some programming experience in *any* language, but can be taken by someone [...]]]></description>
				<content:encoded><![CDATA[<p>We are running a workshop on Feb. 22nd about getting started with Python.  We will help you get <a href="http://www.python.org/">Python</a> installed and setup, and get you working on some great initial projects to get your feet wet.   This class is best for people with some programming experience in *any* language, but can be taken by someone without any experience at all.   The <a href="http://hive-76.ticketleap.com">workshop is a measly $5 suggested donation to cover snacks,etc. </a> If you really can&#8217;t afford that, we have <a href="http://hive-76.ticketleap.com">$0 tickets available</a> too. </p>
<p>You will need to bring your own computer (Mac/Linux/Windows) and your curiosity.  Bonus points if you bring a snack for the people running the workshop! It&#8217;s be quick, it&#8217;ll be fun, and you will walk away knowing how to build some cool stuff using your new tools. This class is brought to you by Hive76, specifically by Phillip and Far.</p>
<blockquote><p>Dive into programming Python:<br />
Mon, February 22, 6:30pm – 8:00pm<br />
915 Spring Garden St (Suite #519) &#8211; Hive76 Headquarters
</p></blockquote>
<table cellpadding='0' cellspacing='0' style='margin:0;padding:0;width:auto;border:0;text-align:center;font-family: Arial, sans-serif;' >
<tr>
<td style='margin:0;padding:0;border:0;background:url(http://www.ticketleap.com/images/ets/buy_left.png) no-repeat;text-shadow:0 1px #eaeaea;font-weight:bold;font-size:15px;height:39px;text-transform:uppercase;'><a href='http://hive-76.ticketleap.com'  id='link' style='color:#383838;text-decoration:none;display:block;padding: 12px 10px 0 30px;height:27px;white-space:nowrap !important;'>Register Now</a><br />
<style>* html #link {padding-top:5px !important;}</style>
</td>
<td style='margin:0;padding:0;border:0;background:url(http://www.ticketleap.com/images/ets/buy_right.png) no-repeat top right;width:20px !important;'><a href='http://hive-76.ticketleap.com' style='text-decoration:none;display:block;height:39px;width:20px !important;'>&nbsp;</a></td>
</tr>
<tr>
<td style='margin:0;padding:0;border:0;background:url(http://www.ticketleap.com/images/ets/buy_bottom.png) repeat-x bottom left;font-size:9px;text-transform:uppercase;text-align:center;'><a href='http://academic.ticketleap.com' style='color:#89dd8c;text-decoration:none;padding:3px 0px 4px 20px;display:block;'>Get Academic tickets</a></td>
<td style='margin:0;padding:0;width:20px !important;border:0;background:url(http://www.ticketleap.com/images/ets/buy_bottom_right.png) repeat-x bottom right;font-size:9px;'></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/python-programming-on-feb-22nd/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SkeinFox v1.0 to convert STL to GCode</title>
		<link>http://www.hive76.org/skeinfox-v1-0-to-convert-stl-to-gcode</link>
		<comments>http://www.hive76.org/skeinfox-v1-0-to-convert-stl-to-gcode#comments</comments>
		<pubDate>Thu, 22 Oct 2009 04:17:43 +0000</pubDate>
		<dc:creator>jmil</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[HiveBot]]></category>
		<category><![CDATA[Instructionals]]></category>
		<category><![CDATA[Philadelphia]]></category>

		<guid isPermaLink="false">http://www.hive76.org/?p=355</guid>
		<description><![CDATA[Download SkeinFox v1.0 (OS X Leopard or Snow Leopard, git 1.6.5+) and checkout this instructional to see what this is all about. Basically this new software project (launched right here at Hive76!) will make MakerBotting a bit easier for everyone. Watch the video in HD mode for best quality. Join the SkeinFox Google Group to [...]]]></description>
				<content:encoded><![CDATA[<p>Download <a title="SkeinFox v1.0" href="http://wiki.github.com/jmil/SkeinFox">SkeinFox v1.0</a> (OS X Leopard or Snow Leopard, git 1.6.5+) and checkout this instructional to see what this is all about. Basically this new software project (launched right here at Hive76!) will make MakerBotting a bit easier for everyone. Watch the video in HD mode for best quality. Join the <a title="SkeinFox Google Group" href="http://groups.google.com/group/skeinfox">SkeinFox Google Group</a> to learn more or provide feedback.</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/hV0MX5OGKMQ&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/hV0MX5OGKMQ&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hive76.org/skeinfox-v1-0-to-convert-stl-to-gcode/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
