<?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; Teaching</title>
	<atom:link href="http://blog.lizarum.com/category/teaching/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>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>iPhone Browser</title>
		<link>http://blog.lizarum.com/2009/10/iphone-browser/</link>
		<comments>http://blog.lizarum.com/2009/10/iphone-browser/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 18:45:13 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Teaching]]></category>
		<category><![CDATA[iPhone Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Web Browser]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=133</guid>
		<description><![CDATA[Perhaps the most typical network task performed by many network
applications is to load a web page.
The functionality of
Safari’s WebKit engine is available to you in the form of the UIWebView.
What we did
Created an application that loaded web pages.


Open Xcode:

Create a new Project (&#8984;+&#8679;+N). Make it a View-based
Application


Name it Browser

Open BrowserViewController.h and add pointers for IBOutlets
for [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps the most typical network task performed by many network<br />
applications is to load a web page.</p>
<p>The functionality of<br />
Safari’s WebKit engine is available to you in the form of the <strong>UIWebView</strong>.</p>
<h4>What we did</h4>
<p><strong>Created an application that loaded web pages.</strong><br />
</p>
<ol>
<li>Open <strong>Xcode</strong>:
<p></li>
<li>Create a new Project (&#8984;+&#8679;+N). Make it a <strong>View-based<br />
Application</strong><br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/10/view_based.png" alt="view_based" title="view_based" width="600" height="443" class="alignnone size-full wp-image-136" /></p>
<p></li>
<li>
Name it <strong>Browser</strong></p>
<p></li>
<li>Open <strong>BrowserViewController.h</strong> and add pointers for <strong>IBOutlets</strong><br />
for <strong>urlField</strong> (a UITextField) and <strong>webView</strong> (a UIWebView).</p>
<p></li>
<li> This application brings up the keyboard. You will<br />
be managing a text field and you will want to <strong>dismiss the keyboard</strong> when the user either clicks a done button or presses <strong> return</strong>. </p>
<p>To dismiss the keyboard, you need to tell the text field to give up its role<br />
as the <strong>first responder</strong>, meaning the component that initially receives<br />
the user input.<br />
<code>[nameField resignFirstResponder];</code></p>
<p>If you look up the documentation for <strong>UITextField</strong>, you’ll see that it has a delegate property<br />
that is defined by the <strong>UITextFieldDelegate</strong> protocol, a defined group of<br />
related methods. <br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/10/UItextFieldDelegate_doc.png" alt="UItextFieldDelegate_doc" title="UItextFieldDelegate_doc" width="565" height="272" class="alignnone size-full wp-image-135" /></p>
<p>Look up this protocol and you’ll see it has numerous<br />
methods that alert the delegate of events relating to the text field. One<br />
of them is <strong>textFieldShouldReturn</strong>, which looks like what you need in order<br />
to know when the user has tapped return.</p>
<p>Add<br />
the <strong>UITextFieldDelegate</strong> protocol declaration too. </p>
<p><code><br />
@interface BrowserViewController : UIViewController <strong>&lt;UITextFieldDelegate&gt;</strong>{</p>
<p></code></p>
<p></li>
<li>Add an instance<br />
method to handle the clicking of the <strong>go</strong> button. It will be of type <strong>IBAction</strong> Name it  <strong>handleGoTapped</strong>.Pass it <strong>(id)sender</strong></p>
<p>Instance methods follow the closed curly brace and precede the @end </li>
<li>Open the <strong>BrowserViewController</strong> nib in <strong>IB</strong> and create the User Interface.
<ul>
<li>A textField</li>
<li>A webView</li>
<li>A GO button</li>
</ul>
<p>
Add a <strong>Placeholder</strong> in the textField so that the user knows to type <strong>http://</strong> and set the keyboard to URL (&#8984;+1)</p>
<p></li>
<li>Make the connections.<br />
(control-click the text field to expose its outlets, and connect<br />
its <strong>Delegate</strong> to <strong>File&#8217;s Owner</strong>.)</p>
<p></li>
<li>Open up <strong>BrowserViewController.m</strong>. You&#8217;ll need to define the method to get the URL from<br />
the text field and have the web view load that site; this method will be<br />
called when the user clicks the <strong>Go</strong> button or when they hit <strong>Return</strong><br />
on the pop-up keyboard.</p>
<p>When the go button is pressed:</p>
<ol>
<li>Close the keyboard by calling <strong>resignFirstResponder</strong> on <strong><br />
urlField</strong></p>
</li>
<li>Call <strong>loadURL</strong> on <strong>self</strong></li>
</ol>
<p></li>
<li>To create the <strong>loadURL </strong>method
<ol>
<li>
Create a pointer named <strong>url</strong> of type<strong> NSURL </strong>and set it to:</p>
<p><code>[[NSURL alloc] initWithString: urlField.text]</code></p>
</li>
<li>Create a pointer named <strong>request<br />
</strong> of type <strong>NSURLRequest</strong> and set it to <br />
<code>[[NSURLRequest alloc] initWithURL: url]</code></p>
</li>
<li>Call <strong>loadRequest</strong> on <strong>webView</strong> and pass it <strong>request</strong>
</li>
<li>Release <strong>request</strong>
</li>
<li>
Release <strong>url</strong>
</li>
</ol>
<p></li>
<li>Add the following method:<br />
<code>-(BOOL)textFieldShouldReturn:(UITextField *)textField {</p>
<p>}</code></p>
<p></li>
<li>Inside the method:
<ol>
<li>Test if the <strong>textField</strong> equals the<strong> urlField</strong> </p>
</li>
<li>Close the keyboard with <strong>resignFirstResponder</strong>
</li>
<li>Call <strong>loadURL</strong> on<strong> self</strong>
</li>
<li>Outside of the conditional, return <strong>YES</strong></li>
</ol>
<p></li>
<li>Implement autoroatation<br />
<code>-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br />
    return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||<br />
            (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||<br />
            (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||<br />
            (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown));<br />
}</code></p>
<p></li>
<li>Save, Build and Run
<p></li>
<li>Enter a url to test
<p></li>
<li>The most obvious thing lacking from<br />
the example is the usual forward and back buttons. You can<br />
 implement them with the <strong>UIWebView</strong>&#8217;s <strong>goForward</strong> and <strong>goBack</strong> methods. Provide a delegate that implements the <strong>UIWebViewDelegate</strong>.</p>
<p></li>
</ol>
<h4>Part 2</h4>
<p>All the substantial work in this application is done<br />
by the <strong>UIWebView</strong>. Once you&#8217;ve loaded the page, this view — backed<br />
by the <strong>WebKit engine</strong> for rendering HTML, interpreting JavaScript, and<br />
handling the network communication — does all the work for handling your web interactions, including submitting forms, navigating to new<br />
pages, running client-side browser apps, etc.</p>
<p>Even if you&#8217;re not planning on developing a browser, the <strong>UIWebView</strong><br />
has other compelling uses. While <strong>UIKit </strong>doesn&#8217;t provide a styled text<br />
component for iPhone apps, you can style HTML to your heart&#8217;s content<br />
with CSS, and put that styled HTML into a <strong>UIWebView</strong>. In fact, this is<br />
an excellent way to provide an <strong>about screen</strong> for your application, as<br />
you can provide links to your application&#8217;s home page, e-mails for tech<br />
support, or even dialable phone number links, all by just authoring<br />
HTML.<br />
To do this, instead of loading a page from the web, you can include<br />
your HTML, CSS, and images in the <strong>application bundle</strong>, and then find<br />
them inside the bundle.  Making a URL from a path in the bundle is just<br />
a matter of converting the path string to an <strong>NSURL</strong>:</p>
<ol>
<li>Create a web page named <strong>mywebpage.html</strong> or use index.html</p>
<p></li>
<li>In the <br />
<code>&lt;head&gt;&lt;/head&gt;</code> section add the following:<br />
<code>&lt;meta name="viewport" content="width=device-width; initial-scale=1.0;" /&gt;<br />
&lt;meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/&gt;<br />
&lt;meta name="apple-mobile-web-app-capable" content="yes" /&gt;</code></p>
</li>
<li>Set css body margin to zero
<p></li>
<li>Add the web page to your project. CTRL+click on Resources. Copy the file to your project.
<p></li>
<li>Create an application like you made in part 1, Name it <strong>Browser2</strong>.
<p></li>
<li>
This application is the same as the previous except for the <strong>loadURL</strong>method. Create the IBOutlets and IBAction in the header file</p>
<p></li>
<li>Open <strong>Browser2ViewController.xib</strong>  create a text filed, web view and button. Make connections and CTRL+click on the textField and link it to the FIle Owner&#8217;s delegate.
<p></li>
<li>Open the Inspector and in the  Text Field set the <strong>Text</strong> to <strong>webpage:</strong>
<p></li>
<li>
This application is the same as the previous except for the <strong>loadURL</strong>method. Open <strong>Browser2ViewController.m</strong> file and define the IBAction method and then create the <strong>loadURL</strong>method<br />
<br />
<code>//fill in the blank with a keyword to show your page<br />
//I did webpage:<br />
NSRange range = [urlField.text rangeOfString: @"______:"];<br />
    NSURL *url = NULL;<br />
    if (range.location == 0) {<br />
        // find the about page in bundle</p>
<p>        NSString *myPath =<br />
        //fill in the blank with the name of your page<br />
        [[NSBundle mainBundle] pathForResource:@"______"<br />
                                        ofType:@"html"];<br />
        url = [[NSURL alloc] initFileURLWithPath: myPath];<br />
    } else {<br />
        url = [[NSURL alloc] initWithString: urlField.text];<br />
    }<br />
    if (url != NULL) {<br />
        NSURLRequest *request = [[NSURLRequest alloc] initWithURL: url];<br />
        [webView loadRequest: request];<br />
        [request release];<br />
        [url release];</p>
<p>    }</code></p>
<p></li>
<li>Add the following method:<br />
<code>- (BOOL)textFieldShouldReturn:(UITextField *)textField {</p>
<p>}</code></p>
<p></li>
<li>Inside the method:
<ol>
<li>Test if the <strong>textField</strong> equals the<strong> urlField</strong> </p>
</li>
<li>Close the keyboard with <strong>resignFirstResponder</strong>
</li>
<li>Call <strong>loadURL</strong> on<strong> self</strong>
</li>
<li>Outside of the conditional, return <strong>YES</strong></li>
</ol>
<p></li>
<li>Implement autoroatation<br />
<code>-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br />
    return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||<br />
            (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||<br />
            (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||<br />
            (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown));<br />
}</code></p>
<p></li>
<li>Save, Build and Run
<p></li>
<li>Modify the <strong>loadURL</strong> method so that if the urlField is empty or if the urlField contains the text <strong>webpage:</strong>, your page gets loaded.
<p></li>
<li>Add  the ability to go forward and back
<p></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/10/iphone-browser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Objective-C Hello World</title>
		<link>http://blog.lizarum.com/2009/09/more-objective-c-hello-world/</link>
		<comments>http://blog.lizarum.com/2009/09/more-objective-c-hello-world/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 15:31:49 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Teaching]]></category>
		<category><![CDATA[iPhone Programming]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=106</guid>
		<description><![CDATA[So, the joke in class was &#8220;will there be a HelloWorld27?&#8221;
Probably not, but we are up to HelloWorld4. 
So the class is small, but made up of students with very different programming backgrounds. Two of the students are very comfortable in the Revolution environment, but are having some difficulty getting used to the C syntax. [...]]]></description>
			<content:encoded><![CDATA[<p>So, the joke in class was &#8220;will there be a HelloWorld27?&#8221;</p>
<p>Probably not, but we are up to HelloWorld4. </p>
<p>So the class is small, but made up of students with very different programming backgrounds. Two of the students are very comfortable in the Revolution environment, but are having some difficulty getting used to the C syntax. The other four students have used Java and/or Arduino, and while the syntax is different, they are finding it easier to adapt what they know to what we are doing.</p>
<p>I find for some students pictures are essential.</p>
<h4>HelloWorld04</h4>
<ol>
<li>Create a an image of yourself with the following dimensions:<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/dimension.png" alt="dimension" title="dimension" width="304" height="133" class="alignnone size-full wp-image-109" /></li>
<li>Save it as a png on the desktop
<p></li>
<li>Open Xcode and create a new project
<p></li>
<li>Create a <strong>View Based</strong> application<br />
    <img src="http://blog.lizarum.com/wp-content/uploads/2009/09/view_based.png" alt="view_based" title="view_based" width="600" height="443" class="alignnone size-full wp-image-110" /></p>
</li>
<li>Save it as <strong>HelloWorld04</strong>
<p></li>
<li>Open up the <strong>HelloWorld04ViewController.h</strong> file
<p></li>
<li>Create a <strong>UILabel</strong> pointer named <strong>label</strong>  of type <strong>IBOutlet</strong>
<p></li>
<li>Below the closed curly brace create an <strong>(IBAction) </strong> named <strong>hello</strong> and pass it <strong>(id)sender</strong>
<p></li>
<li>Open the Implementation file and define the <strong>hello</strong> function so that the <strong>text </strong> of <strong>label</strong> is set to a message
<p></li>
<li>Save the files
<p></li>
<li>CTRL+click on the <strong>Resources folder</strong> and add the png. Make sure to <strong> Copy items into destination group&#8217;s folder(if needed)</strong>
<p></li>
<li>Open up the main nib  file
<p></li>
<li>Double click on the <strong>HelloWorld04ViewController</strong> in the MainWindow.xib<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/viewController.png" alt="viewController" title="viewController" width="294" height="269" class="alignnone size-full wp-image-124" />
</li>
<li>Click on the link<br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/link.png" alt="link" title="link" width="313" height="502" class="alignnone size-full wp-image-121" />
</li>
<li>From the library add a <strong>UIImageView</strong>
<p></li>
<li>In the attribute window set the image to your png
<p></li>
<li>From the library drag a <strong>UILabel</strong> onto the view. Adjust the size
<p></li>
<li>Clear the Text in the Text field
<p></li>
<li>Choose a color for the text in the attribute window
<p></li>
<li>From the library drag a button on to the view and change the label on the button to <strong>Press Me</strong>
<p></li>
<li>In the xib window click on <strong>File&#8217;s Owner</strong> and press &#8984;+2.
<p></li>
<li>Connect <strong>label</strong> to the label in the view.
<p></li>
<li>connect <strong>hello:</strong> to the button and select <strong>Touch up inside</strong>
<p></li>
<li>Save the xib file
<p></li>
<li>Build and run
<p></li>
<li>Modify the code so that the text keeps toggling between two  expressions. <br /><img src="http://blog.lizarum.com/wp-content/uploads/2009/09/animation.gif" alt="animation" title="animation" width="200" height="385" class="alignnone size-full wp-image-120" />
</li>
<li>Add an <strong>NSLog()</strong> statement to print out the current text to the console.
<p></li>
<li>Save the xib file
<p></li>
<li>Build and run (&#8984;+&#8679;+R)
<p></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/more-objective-c-hello-world/feed/</wfw:commentRss>
		<slash:comments>2</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>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>Hello World!</title>
		<link>http://blog.lizarum.com/2009/09/hello-world-2/</link>
		<comments>http://blog.lizarum.com/2009/09/hello-world-2/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 02:54:58 +0000</pubDate>
		<dc:creator>Lizabeth Arum</dc:creator>
				<category><![CDATA[Teaching]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Physical Computing]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.lizarum.com/?p=3</guid>
		<description><![CDATA[
After spending the past summer gathering materials for my different classes, I thought it might be nice to share what I found inspiring, what I learned and how it all panned out. 
Over the year, I will write about my experiences teaching Physical Computing, IPhone programming, and 2D and 3D animation  to kids. I&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-4" title="clark" src="http://blog.lizarum.com/wp-content/uploads/2009/09/clark-500x375.jpg" alt="clark" width="500" height="375" /><br />
<br />After spending the past summer gathering materials for my different classes, I thought it might be nice to share what I found inspiring, what I learned and how it all panned out. </p>
<p>Over the year, I will write about my experiences teaching Physical Computing, IPhone programming, and 2D and 3D animation  to kids. I&#8217;ll try to explore what worked and what didn&#8217;t, what I would do again, and what I wouldn&#8217;t. </p>
<p>I&#8217;ve learned so much from various people, books and websites, and I hope that by sharing my thoughts, successes and failures, I can give back to a community that I have gotten so much from.</p>
<p>This is my first blog. wish me luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lizarum.com/2009/09/hello-world-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
