<?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>How I Stopped Worrying and Learned to Love the Blog &#187; switch</title>
	<atom:link href="http://www.ckundo.com/tag/switch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ckundo.com</link>
	<description>Cameron Cundiff @ NYU ITP and beyond</description>
	<lastBuildDate>Wed, 01 Sep 2010 20:41:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Light switch combination lock</title>
		<link>http://www.ckundo.com/2008/09/light-switch-2/</link>
		<comments>http://www.ckundo.com/2008/09/light-switch-2/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 19:32:30 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[physical computing]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[sensor]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://www.cameroncundiff.com/?p=54</guid>
		<description><![CDATA[// declare variables: int switchPin01 = 7; //xlarge photocell int switchPin02 = 2; //large photocell int switchPin03 = 5; //small photocell int greenLedPin = 3; // digital output pin for an LED int redLedPin = 4; // digital output pin for an LED int switchState01 = 0; // the state of the xlarge switch int [...]]]></description>
			<content:encoded><![CDATA[<p>
<script type="text/javascript">
<!--
var ourTags='';
ourTags+='<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="257" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
ourTags+='<PARAM name="SRC" VALUE="http://www.cameroncundiff.com/media/switchy.mov" />';
ourTags+='<PARAM name="CONTROLLER" VALUE="true" />';
ourTags+='<PARAM name="AUTOPLAY" VALUE="false" />';
ourTags+='<PARAM name="SCALE" VALUE="ASPECT" />';
ourTags+='<EMBED ';
ourTags+='SRC="http://www.cameroncundiff.com/media/switchy.mov" CONTROLLER="true"';
ourTags+=' type="video/quicktime" WIDTH="320" HEIGHT="257" AUTOPLAY="false" SCALE="ASPECT" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>';
ourTags+='</OBJECT>';
if (typeof writeTags == "undefined") { document.write(ourTags);} else {writeTags(ourTags);
}//-->
</script>
<noscript>
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="257" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM name="SRC" VALUE="http://www.cameroncundiff.com/media/switchy.mov" />
<PARAM name="CONTROLLER" VALUE="true" />
<PARAM name="AUTOPLAY" VALUE="false" />
<PARAM name="SCALE" VALUE="ASPECT" />
<EMBED 
SRC="http://www.cameroncundiff.com/media/switchy.mov" CONTROLLER="true"
 type="video/quicktime" WIDTH="320" HEIGHT="257" AUTOPLAY="false" SCALE="ASPECT" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>
</OBJECT>

</noscript>
<br />
<span id="more-54"></span><br />
// declare variables:<br />
int switchPin01 = 7; //xlarge photocell<br />
int switchPin02 = 2; //large photocell<br />
int switchPin03 = 5; //small photocell<br />
int greenLedPin = 3;   //  digital output pin for an LED<br />
int redLedPin = 4;      //  digital output pin for an LED<br />
int switchState01 = 0;    // the state of the xlarge switch<br />
int switchState02 = 0;    // the state of the large switch<br />
int switchState03 = 0;    //small switch</p>
<p>void setup() {<br />
pinMode(switchPin01, INPUT);<br />
pinMode(switchPin02, INPUT);  // set the switch pin to be an input<br />
pinMode(switchPin03, INPUT);<br />
pinMode(greenLedPin, OUTPUT);   // set the yellow LED pin to be an output<br />
pinMode(redLedPin, OUTPUT);// set the red LED pin to be an output<br />
}</p>
<p>void loop() {<br />
// read the switch input:<br />
switchState01 = digitalRead(switchPin01);<br />
switchState02 = digitalRead(switchPin02);<br />
switchState03 = digitalRead(switchPin03);</p>
<p>//enough light = 1, dark = 0 &#8211; then green<br />
if (switchState01 == 1 &#038;&#038; switchState02 == 0 &#038;&#038; switchState03 == 1) {<br />
// if the switch is closed:<br />
digitalWrite(greenLedPin, HIGH);    // turn on the yellow LED<br />
digitalWrite(redLedPin, LOW);       // turn off the red LED<br />
}<br />
else {<br />
// if the switch is open:<br />
digitalWrite(greenLedPin, LOW);   // turn off the yellow LED<br />
digitalWrite(redLedPin, HIGH);     // turn on the red LED<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ckundo.com/2008/09/light-switch-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.cameroncundiff.com/media/switchy.mov" length="1343359" type="video/quicktime" />
		</item>
		<item>
		<title>Light switch</title>
		<link>http://www.ckundo.com/2008/09/light-switch/</link>
		<comments>http://www.ckundo.com/2008/09/light-switch/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 01:37:04 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[physical computing]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[sensor]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://www.cameroncundiff.com/?p=36</guid>
		<description><![CDATA[// declare variables: int switchPin01 = 1; //small photocell int switchPin02 = 2; //large photocell int yellowLedPin = 3;   //  digital output pin for an LED int redLedPin = 4;      //  digital output pin for an LED int switchState01 = 0;    // the state of the switch int switchState02 = 0;    // the state of [...]]]></description>
			<content:encoded><![CDATA[<p>
<script type="text/javascript">
<!--
var ourTags='';
ourTags+='<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="257" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
ourTags+='<PARAM name="SRC" VALUE="http://www.cameroncundiff.com/media/lightswitch.mov" />';
ourTags+='<PARAM name="CONTROLLER" VALUE="true" />';
ourTags+='<PARAM name="AUTOPLAY" VALUE="false" />';
ourTags+='<PARAM name="SCALE" VALUE="ASPECT" />';
ourTags+='<EMBED ';
ourTags+='SRC="http://www.cameroncundiff.com/media/lightswitch.mov" CONTROLLER="true"';
ourTags+=' type="video/quicktime" WIDTH="320" HEIGHT="257" AUTOPLAY="false" SCALE="ASPECT" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>';
ourTags+='</OBJECT>';
if (typeof writeTags == "undefined") { document.write(ourTags);} else {writeTags(ourTags);
}//-->
</script>
<noscript>
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="257" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM name="SRC" VALUE="http://www.cameroncundiff.com/media/lightswitch.mov" />
<PARAM name="CONTROLLER" VALUE="true" />
<PARAM name="AUTOPLAY" VALUE="false" />
<PARAM name="SCALE" VALUE="ASPECT" />
<EMBED 
SRC="http://www.cameroncundiff.com/media/lightswitch.mov" CONTROLLER="true"
 type="video/quicktime" WIDTH="320" HEIGHT="257" AUTOPLAY="false" SCALE="ASPECT" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>
</OBJECT>

</noscript>
</p>
<p><span id="more-36"></span></p>
<p>// declare variables:<br />
int switchPin01 = 1; //small photocell<br />
int switchPin02 = 2; //large photocell<br />
int yellowLedPin = 3;   //  digital output pin for an LED<br />
int redLedPin = 4;      //  digital output pin for an LED<br />
int switchState01 = 0;    // the state of the switch<br />
int switchState02 = 0;    // the state of the switch</p>
<p>void setup() {<br />
pinMode(switchPin01, INPUT);<br />
pinMode(switchPin02, INPUT);  // set the switch pin to be an input<br />
pinMode(yellowLedPin, OUTPUT);   // set the yellow LED pin to be an output<br />
pinMode(redLedPin, OUTPUT);      // set the red LED pin to be an output<br />
}</p>
<p>void loop() {<br />
// read the switch input:<br />
switchState01 = digitalRead(switchPin01);<br />
switchState02 = digitalRead(switchPin02);</p>
<p>//covered (0), not(1) &#8211; then yellow<br />
if (switchState01 == 0 &amp;&amp; switchState02 == 0) {<br />
// if the switch is closed:<br />
digitalWrite(yellowLedPin, HIGH);    // turn on the yellow LED<br />
digitalWrite(redLedPin, LOW);       // turn off the red LED<br />
}<br />
else {<br />
// if the switch is open:<br />
digitalWrite(yellowLedPin, LOW);   // turn off the yellow LED<br />
digitalWrite(redLedPin, HIGH);     // turn on the red LED<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ckundo.com/2008/09/light-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.cameroncundiff.com/media/lightswitch.mov" length="1842635" type="video/quicktime" />
		</item>
		<item>
		<title>basic switch</title>
		<link>http://www.ckundo.com/2008/09/basic-switch/</link>
		<comments>http://www.ckundo.com/2008/09/basic-switch/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 21:00:34 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[physical computing]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://www.cameroncundiff.com/?p=11</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
<script type="text/javascript">
<!--
var ourTags='';
ourTags+='<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="257" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">';
ourTags+='<PARAM name="SRC" VALUE="http://www.cameroncundiff.com/media/switch.mov" />';
ourTags+='<PARAM name="CONTROLLER" VALUE="true" />';
ourTags+='<PARAM name="AUTOPLAY" VALUE="false" />';
ourTags+='<PARAM name="SCALE" VALUE="ASPECT" />';
ourTags+='<EMBED ';
ourTags+='SRC="http://www.cameroncundiff.com/media/switch.mov" CONTROLLER="true"';
ourTags+=' type="video/quicktime" WIDTH="320" HEIGHT="257" AUTOPLAY="false" SCALE="ASPECT" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>';
ourTags+='</OBJECT>';
if (typeof writeTags == "undefined") { document.write(ourTags);} else {writeTags(ourTags);
}//-->
</script>
<noscript>
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320" HEIGHT="257" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<PARAM name="SRC" VALUE="http://www.cameroncundiff.com/media/switch.mov" />
<PARAM name="CONTROLLER" VALUE="true" />
<PARAM name="AUTOPLAY" VALUE="false" />
<PARAM name="SCALE" VALUE="ASPECT" />
<EMBED 
SRC="http://www.cameroncundiff.com/media/switch.mov" CONTROLLER="true"
 type="video/quicktime" WIDTH="320" HEIGHT="257" AUTOPLAY="false" SCALE="ASPECT" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED>
</OBJECT>

</noscript>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ckundo.com/2008/09/basic-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.cameroncundiff.com/media/switch.mov" length="686324" type="video/quicktime" />
		</item>
	</channel>
</rss>
