<?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>Liz Arum&#039;s Blog &#187; Circuits</title>
	<atom:link href="http://blog.lizarum.com/category/circuits/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lizarum.com</link>
	<description>I teach tech and share it</description>
	<lastBuildDate>Tue, 03 Nov 2009 16:42:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Button Fun</title>
		<link>http://blog.lizarum.com/2009/11/button-fun/</link>
		<comments>http://blog.lizarum.com/2009/11/button-fun/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 16:42:17 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=182</guid>
		<description><![CDATA[This was my example. When you clicked the button, the face appeared and a sound file of a scream played.
I also suggested, to help students understand the interaction, that they could start with a picture of an animal, like a pig. If you clicked the tail, the image should change and a squeal should play.
iPhone [...]]]></description>
			<content:encoded><![CDATA[<p>This was my example. When you clicked the button, the face appeared and a sound file of a scream played.<br />
I also suggested, to help students understand the interaction, that they could start with a picture of an animal, like a pig. If you clicked the tail, the image should change and a squeal should play.<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/surprise.gif" alt="surprise" title="surprise" width="200" height="388" class="alignright size-full wp-image-189" /></p>
<h2>iPhone Project with buttons and sound</h2>
<ol>
<li>Create a background image</p>
<p></li>
<li>Create a foreground image
<p></li>
<li>Create an icon image 57 x 57px
<p></li>
<li>Find a sound. Open the sound in Audacity and save as 32-bit sound.
<p></li>
<li>Open <strong>XCode</strong>
<p></li>
<li>Create a <strong>ViewBased </strong>Project
<p></li>
<li>Add the images and the sound
<p></li>
<li>Update the <strong>plist</strong> file
<p></li>
<li>Add a framework by CTRL+clicking on <strong>Frameworks</strong>. Select <strong>Existing Frameworks</strong> and add <strong>AudioToolbox.framework</strong><br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/add_framework-554x600.png" alt="add_framework" title="add_framework" width="554" height="600" class="alignright size-medium wp-image-183" />
<p></li>
<li>Open the header file
<p></li>
<li>Create a statement that imports the <strong>AudioToolbox/AudioToolbox.h</strong>
<p></li>
<li>Add 3 <strong>IBOutlets</strong>. One to hold a <strong>UILabel </strong>and the other two to hold pointers of type <strong>UIImageView</strong>
<p></li>
<li>Create a pointer of type <strong>NSTimer</strong> and name it <strong>resetTimer</strong>
<p></li>
<li>Create a a variable named sound of type <strong>SystemSoundID</strong>
<p></li>
<li>Create 3 <strong>@property</strong> declarations for the label and the <strong>UIImageViews</strong>
<p></li>
<li>Create a buttonPressed <strong>IBAction</strong> that takes sender of type id as its parameter.
<p></li>
<li>Open the implementation file
<p></li>
<li><strong>@synthesize</strong> the properties
<p></li>
<li>Define the <strong>buttonPressed</strong> method:
<div class="box7">
<ol>
<li>Set the <strong>text</strong> of your label to your message
<p></li>
<li>Create a pointer named <strong>foregroundImg</strong> of type <strong>UIImage</strong> and set it to the <strong>UIImage</strong> method <strong>imageNamed</strong> with the name of your foreground image as your parameter
<p></li>
<li>Set the <strong>image</strong> of the <strong>UIImageView</strong> that will pop up, to be the variable you just created (foregroundImg)
<p></li>
<li>Set the <strong>hidden</strong> property of that <strong>UIImageView</strong> to <strong>NO</strong>
<p></li>
<li>Test if <strong>sound</strong> and
<p>if the condition is met, then call:<br />
<code>AudioServicesPlaySystemSound(sound);<br />
</code></p>
<p></li>
<li>Test if <strong>resetTimer</strong> does NOT equal <strong>nil</strong>
<p>If the condition is met, then call:<br />
<code>[resetTimer invalidate];<br />
</code></p>
<p></li>
<li>Now set <strong>resetTimer</strong> to<br />
<code>resetTimer = [NSTimer scheduledTimerWithTimeInterval:1.1 target:self selector:@selector(resetImages:) userInfo:nil repeats:NO];<br />
</code></p>
</li>
</ol>
</div>
<p></li>
<li>Now you have to define the method you just called (<strong>resetImages</strong>)
<p><code><br />
- (void)resetImages:(NSTimer *)sender{</p>
<p>}</code></li>
<li>Inside the method:
<div class="box7">
<ol>
<li>Set the  <strong>hidden</strong> property of the <strong>UIImageView</strong> that pops up to <strong>YES</strong></p>
<p></li>
<li>Empty the label.
<p></li>
<li>Set <strong>resetTimer</strong> to <strong>nil</strong>
</li>
</ol>
</div>
<p></li>
<li>Navigate to and uncomment <strong>viewDidLoad</strong>
<p></li>
<li>After the call to super, include these lines (remember to update the name of your audio file):<br />
<code><br />
 CFBundleRef mainBundle = CFBundleGetMainBundle();<br />
	CFURLRef soundUrlRef = CFBundleCopyResourceURL(mainBundle, CFSTR ("aaaah2"), CFSTR ("wav"), NULL);</p>
<p>	// Create a system sound object representing the sound file<br />
    AudioServicesCreateSystemSoundID (soundUrlRef,  &amp;sound);<br />
    </code></p>
<p></li>
<li>Open the nib file and add a<strong> UIImageView </strong>
<p></li>
<li>Using the inspector set it to hold your background image
</li>
<li>Add a label
<p></li>
<li>Add a button<br />
<a href="http://blog.lizarum.com/wp-content/uploads/2009/11/bgImage.png"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/bgImage.png" alt="bgImage" title="bgImage" width="200" height="313"  size-full wp-image-185" /></a></p>
<p></li>
<li>Add another <strong>UIImageView</strong> and align it with the <strong>bottom</strong><br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/11/bottom.png" alt="bottom" title="bottom" width="400" height="327"  size-full wp-image-186" /></p>
<p></li>
<li>Connect The <strong>File Owner </strong>to label and select label<br />
    <img src="http://blog.lizarum.com/wp-content/uploads/2009/11/to_label.png" alt="to_label" title="to_label" width="400" height="106"  size-full wp-image-190" /></p>
<p></li>
<li>Connect the button to the <strong>File Owner</strong> and select <strong>buttonPressed</strong><br />
   <img src="http://blog.lizarum.com/wp-content/uploads/2009/11/btn.png" alt="btn" title="btn" width="400" height="154" size-full wp-image-187" /></p>
<p></li>
<li>Connect the <strong>File Owner</strong> to the <strong>UIImageView </strong> aligned to the bottom and select the name holding the <strong>UIImageView</strong> that pops up<br />
  <img src="http://blog.lizarum.com/wp-content/uploads/2009/11/imageView.png" alt="imageView" title="imageView" width="400" height="335"  size-full wp-image-188" /></p>
<p></li>
</ol>
<p>
This project was inspired by <a href="http://www.rorylewis.com/docs/02iPhone/05_iPhoneTutorials.htm">Rory Lewis&#8217;s tutorials</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/11/button-fun/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Some early projects</title>
		<link>http://blog.lizarum.com/2009/11/some-early-projects/</link>
		<comments>http://blog.lizarum.com/2009/11/some-early-projects/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 03:55:57 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[iPhone Programming]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=177</guid>
		<description><![CDATA[Physical Computing
Here are a few of the recently completed projects:
FSR and LEDs
A soft circuit button and LEDs
Potentiometer controlled LEDs with 2 modes controlled by a button
FSR controlled spooky eyes
A few other interesting projects are in the works. Two involve the capacitive sensor. The first uses a hacked disposable digital camera that flashes when the sensor [...]]]></description>
			<content:encoded><![CDATA[<h2>Physical Computing</h2>
<p>Here are a few of the recently completed projects:<a href="http://blog.lizarum.com/wp-content/uploads/2009/11/P1120064.JPG"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/P1120064-600x450.jpg" alt="P1120064" title="P1120064" width="600" height="450" class="alignnone size-medium wp-image-176" /></a><br />
FSR and LEDs</p>
<p><a href="http://blog.lizarum.com/wp-content/uploads/2009/11/Movie.jpg"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/Movie-600x450.jpg" alt="Movie" title="Movie" width="600" height="450" class="alignnone size-medium wp-image-178" /></a>A soft circuit button and LEDs</p>
<p><a href="http://blog.lizarum.com/wp-content/uploads/2009/11/light4.png"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/light4.png" alt="light4" title="light4" width="260" height="210" class="alignnone size-full wp-image-179" /></a><br />Potentiometer controlled LEDs with 2 modes controlled by a button</p>
<p><a href="http://blog.lizarum.com/wp-content/uploads/2009/11/img3.png"><img src="http://blog.lizarum.com/wp-content/uploads/2009/11/img3.png" alt="img3" title="img3" width="288" height="384" class="alignnone size-full wp-image-180" /></a><br />FSR controlled spooky eyes</p>
<p>A few other interesting projects are in the works. Two involve the capacitive sensor. The first uses a hacked disposable digital camera that flashes when the sensor is triggered. The second project was created as a Halloween installation. I hope there were pictures! </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/11/some-early-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Short Week</title>
		<link>http://blog.lizarum.com/2009/10/a-short-week/</link>
		<comments>http://blog.lizarum.com/2009/10/a-short-week/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 13:01:43 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Blender]]></category>
		<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[iPhone Programming]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=161</guid>
		<description><![CDATA[I finished my soft circuit. Now when you pet it it purrs and flashes its eyes. I added a homemade capacitance sensor and a vibrating motor. I started with this information, but ended up using Paul Badger&#8217;s CapacitiveSense003 library which worked great. My circuit uses a 2.2M&#937; resistor to  connect pins 2 and 5 [...]]]></description>
			<content:encoded><![CDATA[<p>I finished my soft circuit. Now when you pet it it purrs and flashes its eyes. I added a homemade capacitance sensor and a vibrating motor. I started with t<a href="http://www.bytecraft.com/Touch_Sensitive_Switch">his information</a>, but ended up using Paul Badger&#8217;s<a href="http://www.arduino.cc/playground/Main/CapSense"> CapacitiveSense003</a> library which worked great. My circuit uses a 2.2M&Omega; resistor to  connect pins 2 and 5 and the sensor itself is made of conductive frabric from <a href="http://www.lessemf.com/">LessEMF</a>. The piece came from the Fabric Sample Set (Cat. #SAMPLER) and I cut in in half and connected it to pin 2 through conductive thread and a 22 AWG hookup wire. </p>
<p>Here&#8217;s the code:<br />
<br />
<code>#include <CapSense.h><br />
const int purr = 9;        // pin that the LED is attached to<br />
const int led = 3;        // pin that the LED is attached to<br />
const int eye1=10;<br />
const int eye2=11;<br />
const int mouth=4;<br />
boolean purring=false;<br />
boolean openEyes=false;<br />
CapSense   cs_1_2 = CapSense(1,2); </p>
<p>void setup(){<br />
  pinMode(purr, OUTPUT);<br />
  pinMode(led, OUTPUT);<br />
  pinMode(eye1, OUTPUT);<br />
  pinMode(eye2, OUTPUT);<br />
  pinMode(mouth, INPUT);<br />
  pinMode(led,OUTPUT);  </p>
<p>  pinMode(purr,OUTPUT);<br />
  digitalWrite(purr, LOW);<br />
  Serial.begin(9600);<br />
}</p>
<p>int touch_sensor(){<br />
  long start = millis();<br />
    long total1 =  cs_1_2.capSense(30);<br />
if (total1<02){<br />
  return 1;<br />
}else{<br />
  return 0;<br />
}</p>
<p>    /*Serial.print(millis() - start);        // check on performance in milliseconds<br />
    Serial.print("\t");                    // tab character for debug windown spacing</p>
<p>    Serial.print(total1);                  // print sensor output 1<br />
            // print sensor output 3</p>
<p>    delay(10); */<br />
}</p>
<p>void loop(){<br />
  int touch=touch_sensor();<br />
 if (digitalRead(mouth)){<br />
  openEyes=true;<br />
  }<br />
  else{<br />
    openEyes=false;<br />
  }</p>
<p>  if(!touch){<br />
 if(purring){<br />
      for(int i=255;i> 0;i-=10){<br />
        analogWrite(purr,i);<br />
        delay(20);<br />
      }</p>
<p>      purring=false;<br />
    }<br />
    else{<br />
      analogWrite(purr,0);<br />
      openEyes=false;<br />
    }<br />
    digitalWrite(led,LOW);</p>
<p>  }<br />
  else{<br />
    purring=true;<br />
    digitalWrite(led,HIGH);</p>
<p>    analogWrite(purr,200);<br />
      openEyes=true;</p>
<p>  }<br />
if (openEyes){<br />
   for(int i=65;i<255;i+=10){<br />
      analogWrite(eye1,i);<br />
      analogWrite(eye2,i);<br />
      delay(10);<br />
    }<br />
    for(int i=255;i>65;i-=10){<br />
      analogWrite(eye1,i);<br />
      analogWrite(eye2,i);<br />
      delay(10);<br />
    }}else{<br />
      analogWrite(eye1,0);<br />
    analogWrite(eye2,0);<br />
    }<br />
}<br />
</code><br />
<br />
Students worked on their own soft circuits this week with different enthusiasm levels. Students used to working through labs, but not producing pieces, enjoyed this assignment  far less than those who like to make crafts. Still, I believe introducing students to conductive thread and conductive fabrics will help them construct later projects.</p>
<p>We did run into a few glitches this week as well. One student plugged 12V into the freeduino. The 12V plug was used in our first experiments, and I had mentioned that the freeduino could be powered by the USB or a battery. I had extra Atmega chips and, apart from the chip, the board seemed fine.</p>
<p> Another student had trouble finding the usbserial port. At first I thought that the <strong>FTDI Drivers for Intel Macs</strong> was not installed, but then he moved to another computer with the same problem. His circuit seemed fine. In the end, it turned out that the USB cable was to blame. As soon as we switched cables, everything worked. It was a brand new cable and it surprised both of us that this was the source of the problems.</p>
<p>IPhone programming is going a bit slower than I anticipated. The class was still working on the second version of the Browser assignment this week. In the meantime, I came up with a way for students to create web pages to document their work:<br />
   <script src="http://lizarum.com/assignments/includes/codegen.js" type="text/javascript"></script></p>
<form id="mycode" method="post" action="#">
<div style="text-align:right;">
<input type="button" value="clear fields" onclick="clearFields();return true;"  />
<hr /></div>
<p></p>
<div style="black 1px solid; ">Background-color:<br /><textarea   id="bg"  rows="1" cols="40"></textarea><br />
Application name:<br /><textarea   id="ApTitle"  rows="1" cols="40"></textarea><br />
<hr />
Notes:<br /><textarea   id="notes"  rows="6" cols="40"></textarea><br />
<hr />
File Name:<br /><textarea   id="fileName"  rows="1" cols="40"></textarea><br />
<br />
Code:<br /><textarea   id="code"  rows="10" cols="40"></textarea></p>
<input type="button" value="Add code with code generator" onclick="pickOne();return true;" />
&nbsp;<br />
<span id="newpage"></span></p>
<p style="text-align:right;">
<input type="button"  id="preview" value="Page Preview" onclick="makePage()"  style="display:none;" /></p>
</div>
</form>
<p>The Blender class is going well. Students have started working with armatures and materials. They have made short quicktime movies of the experiments and everyone is still engaged in the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/10/a-short-week/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A cute soft circuit project</title>
		<link>http://blog.lizarum.com/2009/10/a-cute-soft-circuit-project/</link>
		<comments>http://blog.lizarum.com/2009/10/a-cute-soft-circuit-project/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 18:55:59 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[Soft Circuits]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=146</guid>
		<description><![CDATA[Here&#8217;s a soft circuit with 2 LEDs and a button. It is basically an electronic sock puppet.
I used a sock covered in a knitted bag. The button is a sewing snap. When the mouth closes, the button returns a 1 and the LEDs flicker.

Here&#8217;s the code
#define btn 4
#define led1 3
#define led2 9
int btnState;
void setup(){
  [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a soft circuit with 2 LEDs and a button. It is basically an electronic sock puppet.</p>
<p>I used a sock covered in a knitted bag. The button is a sewing snap. When the mouth closes, the button returns a 1 and the LEDs flicker.</p>
<p><object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width="640"<br />
        height="850" codebase='http://www.apple.com/qtactivex/qtplugin.cab'><param name='src' value="../../images/keyframes/your_mov_name.MOV"><param name='autoplay' value="true"><param name='controller' value="true"><param name='loop' value="true"><embed src="http://blog.lizarum.com/wp-content/uploads/2009/10/puppet1.mov" width="320" height="255" autoplay="false"<br />
        controller="true" loop="false" pluginspage='http://www.apple.com/quicktime/download/'></embed></object></p>
<p>Here&#8217;s the code</p>
<p><code>#define btn 4<br />
#define led1 3<br />
#define led2 9<br />
int btnState;</p>
<p>void setup(){<br />
  pinMode(led1,OUTPUT);<br />
   pinMode(led2,OUTPUT);<br />
  pinMode(btn,INPUT);</p>
<p>}</p>
<p>void loop(){<br />
btnState=digitalRead(btn);<br />
if(btnState){<br />
      for(int i=50;i<255;i+=5){<br />
        analogWrite(led1,i);<br />
          analogWrite(led2,i);<br />
        delay(10);<br />
      }<br />
       for(int i=255;i>100;i-=5){<br />
        analogWrite(led1,i);<br />
          analogWrite(led2,i);<br />
        delay(10);<br />
      }<br />
}else{<br />
   digitalWrite(led1,LOW);<br />
   digitalWrite(led2,LOW);<br />
}<br />
      Serial.println(digitalRead(btn));<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/10/a-cute-soft-circuit-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://blog.lizarum.com/wp-content/uploads/2009/10/puppet1.mov" length="431587" type="video/quicktime" />
		</item>
		<item>
		<title>Freeduinos!</title>
		<link>http://blog.lizarum.com/2009/09/freeduinos/</link>
		<comments>http://blog.lizarum.com/2009/09/freeduinos/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 04:08:36 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=127</guid>
		<description><![CDATA[Both my middle school and high school classes worked on putting together the Freeduino kits.
 In order to avoid any soldering mistakes, I asked students to place all there resistors in the board first, and once I checked them, they could solder away. Capacitors were next, then LEDs then everything else. The middle school class [...]]]></description>
			<content:encoded><![CDATA[<p>Both my middle school and high school classes worked on putting together the <a href="http://www.nkcelectronics.com/freeduino-arduino-diecimila-compatible-board-complete-kit.html">Freeduino kits</a>.<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/yhst-82942516561161_2071_4704635.jpeg" alt="yhst-82942516561161_2071_4704635" title="yhst-82942516561161_2071_4704635" width="400" height="267" class="alignnone size-full wp-image-130" /><br />
 In order to avoid any soldering mistakes, I asked students to place all there resistors in the board first, and once I checked them, they could solder away. Capacitors were next, then LEDs then everything else. The middle school class had more success with putting the kits together quickly. Maybe soldering was more of a novelty for them? They completed their boards within two classes, but the high school students had the potential to drag the process into a third class. Rather than do that, I finished all but one of the boards. There was one  high school student who completed his Freeduino over the weekend and worked on the <a href="http://www.adafruit.com/index.php?main_page=product_info&#038;cPath=17_21&#038;products_id=51&#038;zenid=1bda84f6ddfa5c96288f40e4ce8b010e">Proto Shield from Adafruit</a> in class.</p>
<p>My intention was to also have both groups make Proto Shields, but now I&#8217;m thinking that that project should be optional.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/freeduinos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Tone Generator and a Cool Purchase</title>
		<link>http://blog.lizarum.com/2009/09/88/</link>
		<comments>http://blog.lizarum.com/2009/09/88/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 02:19:12 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[Makerbot]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Timer IC]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=88</guid>
		<description><![CDATA[A few years back, I took a summer physical computing class at Parsons with Dan Mikesell. For our first circuit he gave us the following schematic and image to work with:

I like this assignment because it introduces an IC chip, the NE555 Timer, and it makes an awful noise when it works. I also like [...]]]></description>
			<content:encoded><![CDATA[<p>A few years back, I took a summer physical computing class at Parsons with Dan Mikesell. For our first circuit he gave us the following schematic and image to work with:<br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/555circuit-600x463.jpg" alt="555circuit" title="555circuit" width="600" height="463" class="alignnone size-medium wp-image-91" /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/555pinout-600x515.jpg" alt="555pinout" title="555pinout" width="600" height="515" class="alignnone size-medium wp-image-92" /><br />
I like this assignment because it introduces an IC chip, the NE555 Timer, and it makes an awful noise when it works. I also like it because initially it seems hard, but when students take a moment to think about the connections, it turns out to be quite simple. I always tell students to start with the GND and Vcc pins and go from there. It&#8217;s like solving a puzzle.</p>
<p>After displaying the schematic, I hand out a bag with the components. For each student, or group of students, I remove the components from the bag, name them, and describe their function. Then I leave students alone to figure out the wiring.</p>
<p>Today was Middle School Physical Computing and it was the last  class of the day. Everyone was exhausted, but we still managed to play with the LED Resistor Calculator and two students out of eight were able to generate annoying tones. </p>
<p>Success!</p>
<p>I also purchased the <a href="http://makerbot.com/">Makerbot </a>CupCake CNC  for school today. Makerbot describes the &#8220;CupCake CNC as a rock solid open source 3D printer that is easy to build, easy to run, and easy to use. Its 100% open source, built to be hacked, and beginner friendly.&#8221; The plan is to have the High School students research digital fabrication and then build the printer in November. Very cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/88/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Piranha Leds and LED Resistance Calculators</title>
		<link>http://blog.lizarum.com/2009/09/piranha-leds-and-led-resistance-calculators/</link>
		<comments>http://blog.lizarum.com/2009/09/piranha-leds-and-led-resistance-calculators/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 01:08:37 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[resistors]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=77</guid>
		<description><![CDATA[It was the first Middle School Physical Computing class of the week today. Class was split between two activities. The first was lighting a 5mm Flux RGB LED piranha. While not told whether they had a common cathode or common anode LED, students were given the following information:
 
DC forward current 20mA
Red: 2V typ, 2.4V [...]]]></description>
			<content:encoded><![CDATA[<p>It was the first Middle School Physical Computing class of the week today. Class was split between two activities. The first was lighting a 5mm Flux RGB LED piranha. While not told whether they had a common cathode or common anode LED, students were given the following information:<br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/rgb_piranha.png" alt="rgb_piranha" title="rgb_piranha" width="185" height="182" class="alignnone size-full wp-image-78" /> <br />
DC forward current 20mA<br />
Red: 2V typ, 2.4V max<br />
Green: 3V typ, 3.6V max<br />
Blue: 3V typ, 3.6V max</p>
<p>After determining their resistor values, each student wired up their circuits to discover if their led was common cathode or common anode. Only one student managed to burn out the led by wiring both sides to power. </p>
<p>After creating some blended colors, students put the lights aside and went on to construct  <a href="http://www.evilmadscientist.com/article.php/ledcalc">Evil Mad Scientists</a>&#8217;s LED Resistance Calculators.</p>
<p>Next class we&#8217;ll put the calculators to use and solve a few problems!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/piranha-leds-and-led-resistance-calculators/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Our First IPhone App</title>
		<link>http://blog.lizarum.com/2009/09/our-first-iphone-app/</link>
		<comments>http://blog.lizarum.com/2009/09/our-first-iphone-app/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 03:21:52 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[iPhone Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=50</guid>
		<description><![CDATA[ I&#8217;m teaching a year long iPhone programming class to middle school students. The only prerequisite for the class is one year of programming. Some of them have worked with Actionscript, Processing and Arduino. Others only have experience with Revolution. 
I&#8217;ve tried to prepare the kids for the work that is involved. I&#8217;ve told them [...]]]></description>
			<content:encoded><![CDATA[<p> I&#8217;m teaching a year long iPhone programming class to middle school students. The only prerequisite for the class is one year of programming. Some of them have worked with Actionscript, Processing and Arduino. Others only have experience with Revolution. </p>
<p>I&#8217;ve tried to prepare the kids for the work that is involved. I&#8217;ve told them that graduate students at ITP were told that their iPhone programming class was going to be harder than any other programming class they&#8217;ve taken. In spite of my warnings, no one was scared off.</p>
<p>To get the ball rolling without talking about Objective-C, students worked on 2 simple applications. The first one, which is included below, is your basic Hello World app. In addition to creating a label, students also got to create their own icons for their applications.</p>
<p>The second application was a <strong>View-Based</strong> Application that modified the code in the implementation file so that the content could turn when the device is turned.</p>
<p>Everyone in the class completed the first part. There were two students that were confused about what a .png was and renamed their photoshop images with the .png extensions. After struggling to get their icons to show up, I&#8217;m pretty sure they won&#8217;t make that mistake again!</p>
<p>Overall, everyone was engaged and the energy level was high. Not bad for the last class of the day.</p>
<p></p>
<h2>Hello World</h2>
<p> <strong><span class="em"></strong>xib </span>files used to be called <span class="em">nib files</span> and Apple continues to refer to them as <span class="em">nib files</span> regardless of their extention.</p>
<p>    Nib files are composed of several parts
<ul>
<li>File&#8217;s Owner</li>
<li>First Reponder</li>
<li>View&mdash;instance of UIView class</li>
</ul>
<p></p>
<h4>Part 1</h4>
<ol>
<li>Open Xcode and create a new project (&#8984;+ &#8679;+N)<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/open_Xcode1-600x275.png" alt="open_Xcode" title="open_Xcode" width="600" height="275" class="alignnone size-medium wp-image-64" /></p>
<p></li>
<li>Select <strong>application</strong> under the iPhone icon on the left
<p></li>
<li>In the right panel select<strong> Window-Based Application</strong>, then press <strong>Choose</strong>. Save the project<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/windows1.png" alt="windows" title="windows" width="594" height="440" class="alignnone size-full wp-image-65" />
</li>
<li>Double-click on the <strong>nib file</strong> to open<br />
<strong>Interface Builder</strong><br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/nib1-600x262.png" alt="nib" title="nib" width="600" height="262" class="alignnone size-medium wp-image-66" /></p>
<p></li>
<li>Open Library (&#8984;+&#8679;+L)<br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/open_library1.png" alt="open_library" title="open_library" width="276" height="342" class="alignnone size-full wp-image-67" /></p>
<p></li>
<li>Scroll down until you see a label icon.<br />
<hr /></li>
<li>Drag from library to view
<p></li>
<li>Open Inspector (&#8984;+ &#8679;+I)<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/open_inspector1.png" alt="open_inspector" title="open_inspector" width="285" height="343" class="alignnone size-full wp-image-68" />
</li>
<li>Modify label so that you pick a size, color, drop shadow and a message.<br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/label_inspector-230x600.png" alt="label_inspector" title="label_inspector" width="230" height="600" class="alignnone size-medium wp-image-57" /></p>
</li>
<li>Save
<p></li>
<li>In Xcode click on <strong>Build and Run</strong>
<p></li>
</ol>
<p>
Interface Builder creates Objective-C objects and serializes those objects in to the nib file so that they can be loaded directly into memory at runtime.</p>
<p>Make sure that if you have an iPhone, your actual iPhone is not plugged  into the computer while developing iPhone applications.</p>
<p><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/HelloWorld-308x600.png" alt="HelloWorld" title="HelloWorld" width="308" height="600" class="alignnone size-medium wp-image-53" /></p>
<p></p>
<h4>Part 2</h4>
<ol>
<li>Open your last project in the <strong>Simulator</strong></p>
<p></li>
<li>Click on the <strong>Home Icon</strong><br />
<img src="http://blog.lizarum.com/wp-content/uploads/2009/09/home_icon.png" alt="home_icon" title="home_icon" width="223" height="152" class="alignnone size-full wp-image-54" /></p>
</li>
<li>Look at your application icon
</li>
<li>You need to create a <strong>.png</strong> icon 57 x 57 pixels. In Photoshop create your icon. Don&#8217;t worry about applying the button effect to it, it will happen automatically. Save it as <strong>icon.png</strong>
<p></li>
<li>Select the <strong>Resources folder</strong> and choose <strong>Add to Project </strong>from the <strong>Project menu</strong> and navigate to the icon. Choose <strong> Copy items into destination group&#8217;s folder(if needed</strong>).<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/importing_icon.png" alt="importing_icon" title="importing_icon" width="410" height="378" class="alignnone size-full wp-image-56" />
</li>
<li>In Xcode expand the <strong>Resources folder</strong>. Click once on <strong>Info.plist</strong>. This property list contains general information about the application you are building, including the name of the icon file.
<p></li>
<li>Find the row with the label <strong>Icon file</strong>. Double click on the empty cell to the right of the label and type in the name of your png file<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/plist-600x516.png" alt="plist" title="plist" width="600" height="516" class="alignnone size-medium wp-image-62" />
</li>
<li>Locate <strong>Bundle identifier</strong>. The standard naming convention is to use <strong>com</strong>  or <strong>org</strong> followed by a period, then the name of the organization, another period and the name of the application.
<p></li>
<li>compile and run
<p></li>
</ol>
<p><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/icon_view-300x600.png" alt="icon_view" title="icon_view" width="300" height="600" class="alignnone size-medium wp-image-55" /></p>
<p></p>
<h4>Clearing out old icons</h4>
<p>Under <strong>iPhone  Simulator</strong> menu  select<strong> Reset Content and Settings:</strong><br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/delete_icons.png" alt="delete_icons" title="delete_icons" width="252" height="213" class="alignnone size-full wp-image-52" /><br />
    </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/our-first-iphone-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Second Time Around</title>
		<link>http://blog.lizarum.com/2009/09/the-second-time-around/</link>
		<comments>http://blog.lizarum.com/2009/09/the-second-time-around/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 02:13:07 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Teaching]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=36</guid>
		<description><![CDATA[In order to wire the circuits and cover all the topics, I put the following information on the board before class started:


VF= Forward Voltage/ Voltage Drop. 
The minimum amount of voltage needed to light an LED

lV= Luminous Intensity
 The amount of light emitted from an LED in a particular direction.
 The greater the numbers the [...]]]></description>
			<content:encoded><![CDATA[<p>In order to wire the circuits and cover all the topics, I put the following information on the board before class started:<br />
</p>
<ul>
<li><strong>V<sub>F</sub></strong>= Forward Voltage/ Voltage Drop. <br />
The minimum amount of voltage needed to light an LED</p>
</li>
<li><strong>l<sub>V</sub></strong>= Luminous Intensity<br />
 The amount of light emitted from an LED in a particular direction.<br />
 The greater the numbers the brighter the light. </p>
</li>
<li><strong>I<sub>F</sub></strong>= Forward Current <br />
The amount of current the LED uses.</p>
</li>
<li><strong>Viewing Angle</strong><br />
The distribution or spread of light.</p>
</li>
</ul>
<p>And the following diagram:<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/3pie1.gif" alt="Ohm&#039;s Law" title="Ohm&#039;s Law" width="179" height="159" class="alignnone size-full wp-image-38" /></p>
<p>Again, all materials were either distributed or placed on the floor in the middle of the group. Students worked together and everyone wired the first circuit using alligator clips, the second circuit using the 12VDC power supply and the third and fourth which wired the  LEDs in series and then in parallel. In order to demonstrate the different voltage drops, the class experimented with different colored LEDs.</p>
<p>Flashing LEDs were thrown into the mix because they&#8217;re cool.</p>
<p>Today&#8217;s class was the last of the day and when it was over, some students stayed late to chat and help clean up.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/the-second-time-around/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First Circuits with High School</title>
		<link>http://blog.lizarum.com/2009/09/first-circuits-with-high-school/</link>
		<comments>http://blog.lizarum.com/2009/09/first-circuits-with-high-school/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 02:48:10 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[Teaching]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=13</guid>
		<description><![CDATA[So today we wired up our first circuits. Before class started I put together boxes for each student with a breadboard, LEDs and a voltage regulator. When students came into class, I handed them their boxes and placed wires, batteries, alligator clips, wire cutters and strippers in the center of the room. Sitting on the [...]]]></description>
			<content:encoded><![CDATA[<p>So today we wired up our first circuits. Before class started I put together boxes for each student with a breadboard, LEDs and a voltage regulator. When students came into class, I handed them their boxes and placed wires, batteries, alligator clips, wire cutters and strippers in the center of the room. Sitting on the floor, we started with nine volt batteries and LEDs with a <strong>forward voltage</strong> of 3V and a <strong>forward current</strong> of 0.03A. After using Ohm&#8217;s Law to figure out the resistance, we selected resistors and used alligator clips to make connections and light the LEDs.</p>
<p>The second circuit included a breadboard, a 12V DC power supply, an LM7805 voltage regulator, an LED and a resistor. As students were less confident about wiring up the voltage regulator and figuring out the new resistance, this circuit took a bit longer to complete. <br />
<div id="attachment_14" class="wp-caption alignnone" style="width: 253px"><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/vr_detail.jpg" alt="voltage regulator detail" title="voltage regulator detail" width="243" height="380" class="size-full wp-image-14" /><p class="wp-caption-text">voltage regulator detail</p></div></p>
<p>After a final wiring check, power supplies were plugged in, and LEDs lit up. </p>
<p>The next circuits involved wiring LEDs in parallel and in series. The challenge here was to see how many could be lit in series and how many in parallel.</p>
<p>Forty-five minutes goes fast. Even though all the materials were prepared ahead of time, I didn&#8217;t get a chance  to cover LED properties or the resistor values involved with illuminating an RGB LED in the way that I planned. No one had time to wire up the Piranhas, or High-Flux LEDs, and no one had a chance to clean up before running to their next class.  <br />
<table border="1" cellspacing="0" cellpadding="5" frame="border" rules="all">
<tr>
<th>Type</th>
<th>Color</th>
<th>I<sub>F</sub></th>
<th>V<sub>F</sub> Typ</th>
<th>V<sub>F</sub> Max</th>
<th>Luminous Intensity</th>
<th>Viewing Angle</th>
<th>Wavelength</th>
</tr>
<tr>
<td>Standard</td>
<td>Red</td>
<td>30mA</td>
<td>1.7V</td>
<td>2.1V</td>
<td>5mcd@10mA</td>
<td>60&deg;</td>
<td>660nm</td>
</tr>
<tr>
<td>Standard</td>
<td>Yellow</td>
<td>30mA</td>
<td>2.1V</td>
<td>2.5V</td>
<td>32mcd@20mA</td>
<td>60&deg;</td>
<td>565nm</td>
</tr>
<tr>
<td>Super bright</td>
<td>Red</td>
<td>30mA</td>
<td>1.85V</td>
<td>2.5V</td>
<td>500mcd@20mA</td>
<td>60&deg;</td>
<td>660nm</td>
</tr>
</table>
<p>Well, tomorrow I&#8217;ll get another shot at it when the Middle School Physical Computing class works on their first circuits.</p>
<div style="height:72px;"></div>
<p><small>This assignment was inspired by <a href="http://www.amazon.com/Fashioning-Technology-Intro-Crafting-Projects/dp/0596514379">Syuzi Pakhchan&#8217;s book Fashioning Technology</a> and from the first circuit I made at ITP in 1998.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/first-circuits-with-high-school/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
