<?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>New Textiles 2011 &#187; Fabric PCB</title>
	<atom:link href="http://newtextiles.media.mit.edu/?feed=rss2&#038;cat=15" rel="self" type="application/rss+xml" />
	<link>http://newtextiles.media.mit.edu</link>
	<description></description>
	<lastBuildDate>Thu, 08 Dec 2011 06:12:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Maria and Albert&#8217;s Laundry Pocket</title>
		<link>http://newtextiles.media.mit.edu/?p=1418</link>
		<comments>http://newtextiles.media.mit.edu/?p=1418#comments</comments>
		<pubDate>Wed, 09 Mar 2011 01:44:18 +0000</pubDate>
		<dc:creator>maria.stangel</dc:creator>
				<category><![CDATA[Fabric PCB]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1418</guid>
		<description><![CDATA[Have you ever run out of quarters while doing your laundry?  With our laundry pocket, a green light will tell you if you have enough quarters for your next load. Our initial design concept was a bit more complicated.  We wanted to leverage the power of the Arduino platform to dynamically and precisely change up [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever run out of quarters while doing your laundry?  With our laundry pocket, a green light will tell you if you have enough quarters for your next load.</p>
<div class="wp-caption alignnone" style="width: 730px"><img title="Laundry Pocket" src="https://lh4.googleusercontent.com/_Y9p6N00ThMQ/TXbBjiw3jaI/AAAAAAABG90/gGBfKjDDS5Y/s720/IMG_0394.JPG" alt="" width="720" height="540" /><p class="wp-caption-text">Maria and Albert&#39;s Laundry Pocket</p></div>
<p><span id="more-1418"></span>Our initial design concept was a bit more complicated.  We wanted to leverage the power of the Arduino platform to dynamically and precisely change up to four outputs connected to our printed circuit board.  Nothing struck the imagination more than a music mash-up like the one below:</p>
<p><a href="http://www.youtube.com/watch?v=5_aEakWFui0&amp;feature=player_detailpage">Greeting Card Music Mash-Up</a></p>
<p>Unfortunately, our electronics skills weren&#8217;t quite good enough to figure out how to connect and more importantly power-up our musical outputs and so we had to go back to the drawing board for something a bit simpler.</p>
<p>What we opted for instead was to a simple laundry pocket, powered by a PCB that flashed an LED red every 0.1 second when the circuit was closed &#8212; in this case, when the button was closed.  However, if there were enough quarters in the pocket and the connection was complete, that red LED would turn off and be replaced by a green LED that flashed every 0.1 second.</p>
<p>You can see a video demo of it here: <a href="https://www.youtube.com/watch?v=picasacid&amp;feature=player_embedded"></a><a href="https://picasaweb.google.com/lh/photo/ybkf85ghA01PKGQ61tOoVOlzJskX5DJhcrXosMa5AKc?feat=directlink">Maria and Albert&#8217;s Laundry Pocket</a></p>
<p>The Arduino code is as follows:<br />
const int buttonPin = 2;<br />
int buttonState = 0;</p>
<p>void setup() {<br />
pinMode(4, OUTPUT);<br />
pinMode(3, OUTPUT);<br />
pinMode(buttonPin, INPUT);</p>
<p>digitalWrite(buttonPin, HIGH);<br />
}<br />
void loop(){</p>
<p>buttonState = digitalRead(buttonPin);<br />
if (buttonState == LOW) {</p>
<p>digitalWrite(4, HIGH);<br />
delay(100);<br />
digitalWrite(4, LOW);<br />
delay(100);</p>
<p>digitalWrite(3, LOW);</p>
<p>} else {</p>
<p>digitalWrite(3, HIGH);<br />
delay(100);<br />
digitalWrite(3, LOW);<br />
delay(100);</p>
<p>digitalWrite(4, LOW);</p>
<p>}<br />
}</p>
<p>More pictures of our process are below &#8212; ENJOY!!!</p>
<div class="wp-caption alignnone" style="width: 650px"><img class=" " title="Putting Together the Pocket" src="https://lh3.googleusercontent.com/_Y9p6N00ThMQ/TXbBhuomNDI/AAAAAAABG9Y/grSx0dm-Npg/Photo%20on%202011-03-07%20at%2018.10%20%232.jpg" alt="" width="640" height="480" /><p class="wp-caption-text">Putting Together the Pocket</p></div>
<div class="wp-caption alignnone" style="width: 650px"><img title="Inserting the PCB into the Pocket" src="https://lh6.googleusercontent.com/_Y9p6N00ThMQ/TXbBhwBgIMI/AAAAAAABG9c/NwrLpgXX6Kg/Photo%20on%202011-03-07%20at%2018.11.jpg" alt="" width="640" height="480" /><p class="wp-caption-text">Inserting the PCB into the Pocket</p></div>
<div class="wp-caption alignnone" style="width: 650px"><img title="Backside of the Pocket" src="https://lh4.googleusercontent.com/_Y9p6N00ThMQ/TXbBiAuFMNI/AAAAAAABG9g/We86PtnEHq4/Photo%20on%202011-03-07%20at%2018.11%20%232.jpg" alt="" width="640" height="480" /><p class="wp-caption-text">Backside of the Pocket</p></div>
<div class="wp-caption alignnone" style="width: 730px"><img title="Ironing on the Laser-Cut Laundry Prints" src="https://lh4.googleusercontent.com/_Y9p6N00ThMQ/TXbBir6nzhI/AAAAAAABG9k/4e_WAJ8iTqM/s720/IMG_0387.JPG" alt="" width="720" height="540" /><p class="wp-caption-text">Ironing on the Laser-Cut Laundry Prints</p></div>
<div class="wp-caption alignnone" style="width: 730px"><img title="New Fashion Statement" src="https://lh3.googleusercontent.com/_Y9p6N00ThMQ/TXbBjCdgcNI/AAAAAAABG9s/Ju3dxzZw7ww/s720/IMG_0389.JPG" alt="" width="720" height="540" /><p class="wp-caption-text">New Fashion Statement</p></div>
<div class="wp-caption alignnone" style="width: 730px"><img title="Pocket Full of Quarters" src="https://lh4.googleusercontent.com/_Y9p6N00ThMQ/TXbBjiw3jaI/AAAAAAABG90/gGBfKjDDS5Y/s720/IMG_0394.JPG" alt="" width="720" height="540" /><p class="wp-caption-text">Pocket Full of Quarters</p></div>
<div class="wp-caption alignnone" style="width: 730px"><img title="Finished Pocket - Front View" src="https://lh6.googleusercontent.com/_Y9p6N00ThMQ/TXbBj-P4a4I/AAAAAAABG98/O-PmUNASN2k/s720/IMG_0396.JPG" alt="" width="720" height="540" /><p class="wp-caption-text">Finished Pocket - Front View</p></div>
<div class="wp-caption alignnone" style="width: 730px"><img title="Finished Pocket - Back View" src="https://lh4.googleusercontent.com/_Y9p6N00ThMQ/TXbBkRSIU_I/AAAAAAABG-E/AMA5rVXWv8U/s720/IMG_0397.JPG" alt="" width="720" height="540" /><p class="wp-caption-text">Finished Pocket - Back View</p></div>
<p><a href="http://www.youtube.com/watch?v=5_aEakWFui0&amp;feature=player_detailpage"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1418</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Temperature Sensing Hat</title>
		<link>http://newtextiles.media.mit.edu/?p=1476</link>
		<comments>http://newtextiles.media.mit.edu/?p=1476#comments</comments>
		<pubDate>Tue, 08 Mar 2011 17:29:50 +0000</pubDate>
		<dc:creator>imoyer@mit.edu</dc:creator>
				<category><![CDATA[Fabric PCB]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1476</guid>
		<description><![CDATA[by Judy Zheng Jia and Ilan Moyer Our concept is a hat which measures the wearer&#8217;s body temperature using a sensor held against their forehead and then displays the measurement with a color-changing antenna. In Action Construction The brain behind the hat is a small microcontroller, the Atmel ATtiny85, mounted to a fabric PCB designed [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><em>by Judy Zheng Jia and Ilan Moyer</em></p>
<p style="text-align: center;"><em><span style="font-size: medium; font-style: normal;"><a rel="attachment wp-att-1478" href="http://newtextiles.media.mit.edu/?attachment_id=1478"><img class="size-full wp-image-1478  aligncenter" title="Judy Front" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Judy-Front.jpg" alt="" width="330" height="400" /></a></span></em></p>
<p style="text-align: left;"><em><span style="font-size: medium; font-style: normal;">Our concept is a hat which measures the wearer&#8217;s body temperature using a sensor held against their forehead and then displays the measurement with a color-changing antenna.</span></em></p>
<p><span id="more-1476"></span></p>
<p style="font-size: medium; text-align: center;"><a rel="attachment wp-att-1491" href="http://newtextiles.media.mit.edu/?attachment_id=1491"><img class="aligncenter size-full wp-image-1491" title="Judy Side" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Judy-Side.jpg" alt="" width="375" height="500" /></a></p>
<p style="font-size: medium; text-align: center;"><a rel="attachment wp-att-1492" href="http://newtextiles.media.mit.edu/?attachment_id=1492"><img class="aligncenter size-full wp-image-1492" title="Ilan Front" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Ilan-Front.jpg" alt="" width="375" height="300" /></a></p>
<p style="font-size: medium; text-align: left;"><strong>In Action</strong></p>
<p style="font-size: medium; text-align: center;"><iframe src="http://player.vimeo.com/video/20899613" width="160" height="120" frameborder="0"></iframe></p>
<p style="font-size: medium; text-align: left;"><strong>Construction</strong></p>
<p style="font-size: medium; text-align: left;"><span style="font-size: medium;">The brain behind the hat is a small microcontroller, the Atmel ATtiny85, mounted to a fabric PCB designed by Prof. Buechley and made by us in lab.</span></p>
<p style="font-size: medium; text-align: left;"><a rel="attachment wp-att-1493" href="http://newtextiles.media.mit.edu/?attachment_id=1493"><img class="aligncenter size-full wp-image-1493" title="attiny" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/attiny.jpg" alt="" width="400" height="368" /></a></p>
<p style="font-size: medium; text-align: left;">
<p style="font-size: medium; text-align: left;">Temperature measurements are currently made by an integrated thermometer-on-a-chip (MCP9700A) which has been sewn in the forehead of the hat.</p>
<p style="font-size: medium; text-align: left;"><a rel="attachment wp-att-1495" href="http://newtextiles.media.mit.edu/?attachment_id=1495"><img class="aligncenter size-full wp-image-1495" title="tempsensor" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/tempsensor.jpg" alt="" width="400" height="387" /></a></p>
<p style="font-size: medium; text-align: left;">A tri-color LED is used as the output device and is mounted on an antenna made of clear plastic fiber.</p>
<p style="font-size: medium; text-align: left;"><a rel="attachment wp-att-1498" href="http://newtextiles.media.mit.edu/?attachment_id=1498"><img class="aligncenter size-full wp-image-1498" title="led" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/led.jpg" alt="" width="400" height="533" /></a></p>
<p style="font-size: medium; text-align: left;"><strong>Current Schematic</strong></p>
<p style="font-size: medium; text-align: left;"><a rel="attachment wp-att-1505" href="http://newtextiles.media.mit.edu/?attachment_id=1505"><img class="aligncenter size-full wp-image-1505" title="L1060054" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/L1060054.jpg" alt="" width="600" height="444" /></a></p>
<p style="font-size: medium; text-align: left;"><strong>Future Schematic</strong></p>
<p style="font-size: medium; text-align: left;"><strong><a rel="attachment wp-att-1506" href="http://newtextiles.media.mit.edu/?attachment_id=1506"><img class="aligncenter size-full wp-image-1506" title="L1060055" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/L1060055.jpg" alt="" width="400" height="547" /></a><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1476</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PCB Puzzle</title>
		<link>http://newtextiles.media.mit.edu/?p=1414</link>
		<comments>http://newtextiles.media.mit.edu/?p=1414#comments</comments>
		<pubDate>Tue, 08 Mar 2011 17:15:31 +0000</pubDate>
		<dc:creator>Sheralyn Woon</dc:creator>
				<category><![CDATA[Fabric PCB]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1414</guid>
		<description><![CDATA[For this project, Crystal and I made a multimedia jigsaw puzzle. We used the PCB we made in class to control the interactivity between the conductive elements in our puzzle. There is 1 circuit with 2 paths: one for the light in the puzzle and one for the sound. Initial Circuit An initial circuitry design [...]]]></description>
			<content:encoded><![CDATA[<p>For this project, Crystal and I made a multimedia jigsaw puzzle. We used  the PCB we made in class to control the interactivity between the  conductive elements in our puzzle. There is 1 circuit with 2 paths: one  for the light in the puzzle and one for the sound.<span id="more-1414"></span>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1459' title='MITPrjPCB1'><img width="150" height="127" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB1.jpg" class="attachment-thumbnail" alt="Testing our PCB" title="MITPrjPCB1" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1460' title='MITPrjPCB2'><img width="150" height="142" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB2.jpg" class="attachment-thumbnail" alt="Experiment with Laser Cutter 1" title="MITPrjPCB2" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1461' title='MITPrjPCB3'><img width="150" height="148" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB3.jpg" class="attachment-thumbnail" alt="Experiment 2 (There are fewer pieces becuase we took the photo after we ironed the pieces on the puzzle." title="MITPrjPCB3" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1462' title='MITPrjPCB4'><img width="145" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB4.jpg" class="attachment-thumbnail" alt="The first cut of the puzzle... problem fitting." title="MITPrjPCB4" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1463' title='MITPrjPCB5'><img width="150" height="124" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB5.jpg" class="attachment-thumbnail" alt="Lasered Wool Felt" title="MITPrjPCB5" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1465' title='MITPrjPCB7'><img width="150" height="128" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB7.jpg" class="attachment-thumbnail" alt="Laser cut Circuit" title="MITPrjPCB7" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1466' title='MITPrjPCB8'><img width="150" height="121" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB8.jpg" class="attachment-thumbnail" alt="Underlying circuit 2" title="MITPrjPCB8" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1517' title='MITPrjPCB'><img width="150" height="94" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB.jpg" class="attachment-thumbnail" alt="Final" title="MITPrjPCB" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1521' title='MITPrjPCB9'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrjPCB9.jpg" class="attachment-thumbnail" alt="MITPrjPCB9" title="MITPrjPCB9" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1546' title='assign3-circuitry'><img width="150" height="102" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/assign3-circuitry.jpg" class="attachment-thumbnail" alt="Final Circuit: Amendments to Circuit" title="assign3-circuitry" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1547' title='assign3-initial-circuit'><img width="150" height="129" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/assign3-initial-circuit.jpg" class="attachment-thumbnail" alt="Initial Circuit Plan" title="assign3-initial-circuit" /></a>
</p>
<p><strong>Initial Circuit</strong><br />
An initial circuitry design featured the circuitry <em>inside</em> the  puzzle pieces. This design had three lights and one puzzle piece that  contained both an LED and a battery. Ideally, this puzzle piece would be  placed first followed by the second or third whose LED would  subsequently light up if attached correctly. The order of the 2nd and  3rd puzzle pieces did not matter. If all three pieces were correctly  attached, all three lights would light up. There are flaws to this  design however &#8212; for example, the pieces without the batteries might be  placed first and despite being correctly positioned, they would not  light up because the battery was contained in another puzzle piece.  After speaking with Leah, we were advised to consider how we might  integrate Arduino into our circuit. We also needed to consider a design  that excluded the battery and micro-controller from the puzzle pieces. <!--more--></p>
<p><strong>Final Circuit</strong><br />
In  considering Arduino, we thought that perhaps we could have a pin  dedicated to each LED along with an input pushbutton that kept track of  whether or not the puzzle piece was correctly attached. To do this  circuit, however, we would&#8217;ve needed at least 8 pins which was more than  the lilypad we made in class contained. So, we simplified our circuit  design and integrated a sound feature.</p>
<p><strong>The path for light is triggered:</strong> When the correct piece of the puzzle is placed in place, the light on the piece will fade in and out. When all the pieces placed correctly, the light emitted will be constant.</p>
<p><strong>The path for the sound is triggered:</strong> When all the pieces are placed correctly, the &#8220;Celebration&#8221; song is played.</p>
<p><strong>The code for the PCB is: </strong></p>
<p><em>int brightness = 0;    // how bright the LED is<br />
int fadeAmount = 5;    // how many points to fade the LED by<br />
const int buttonPin = 1;<br />
int buttonState = 0;</em></p>
<p><em>void setup()  {<br />
//Initialize the PINS<br />
pinMode(0, OUTPUT);     // ALL on , FADING each will start fading when put in the correct spot<br />
pinMode(buttonPin, INPUT);    // Pushbutton, when all are assembled  correctly, they complete a circuit which turns on the music<br />
// When the music turns on/circuit is completed, the lights stay on, NO FADING.<br />
digitalWrite(buttonPin, HIGH);<br />
}</em></p>
<p><em>void loop()  {</em></p>
<p><em>buttonState = digitalRead(buttonPin);</em> <em> </em></p>
<p><em>// check if the pushbutton is pressed.</em> <em><br />
if (buttonState == LOW) {<br />
analogWrite(0, 255);    // all turn on to brightness.</em></p>
<p><em>} </em> <em><br />
else {<br />
analogWrite(0, brightness);    // all turn on to brightness.<br />
brightness = brightness + fadeAmount;<br />
if (brightness == 0 || brightness == 255) {<br />
fadeAmount = -fadeAmount ;<br />
}</em></p>
<p><em>// wait for 30 milliseconds to see the dimming effect </em> <em><br />
delay(30);</em></p>
<p>These are our videos</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="390" 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/6TMd4lLiLYQ?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="390" src="http://www.youtube.com/v/6TMd4lLiLYQ?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="390" 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/CYeVDgdtvAA?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="390" src="http://www.youtube.com/v/CYeVDgdtvAA?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="390" 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/uQoKaLI3jGo?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="390" src="http://www.youtube.com/v/uQoKaLI3jGo?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/f1JRqI9fydo" frameborder="0" allowfullscreen></iframe></p>
<p><strong>Learning Points:</strong></p>
<p>1. Use similar LEDs for parallel circuits to ensure that all light up at the same time.</p>
<p>2. Use magnetic or conductive velcro attachments to complete circuits.</p>
<p>3. Measure the resistance of the circuits to ensure batteries are not overloaded.</p>
<p>4. Create another separate circuit for the sound so that it doesn&#8217;t go through the micro-controller.</p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1414</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PCB LED Cell Phone Case</title>
		<link>http://newtextiles.media.mit.edu/?p=1417</link>
		<comments>http://newtextiles.media.mit.edu/?p=1417#comments</comments>
		<pubDate>Tue, 08 Mar 2011 15:59:40 +0000</pubDate>
		<dc:creator>N.Tari</dc:creator>
				<category><![CDATA[Fabric PCB]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1417</guid>
		<description><![CDATA[By Nicole and Heidi At the start, we decided that we wanted to build a prototype that uses pressure sensors to trigger some reaction. With this in mind, we designed a cell phone case that would alert the user to a missed call or text with LEDs. When the phone vibrates, the felt case dampers [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><em>By Nicole and Heidi</em></p>
<p style="text-align: center;"><a rel="attachment wp-att-1496" href="http://newtextiles.media.mit.edu/?attachment_id=1496"><img class="size-full wp-image-1496 aligncenter" title="Final 1" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Final-1_small.jpg" alt="" width="683" height="513" /></a></p>
<p>At the start, we decided that we wanted to build a prototype that uses pressure sensors to trigger some reaction. With this in mind, we designed a cell phone case that would alert the user to a missed call or text with LEDs. When the phone vibrates, the felt case dampers the sound of the vibration and simultaneously triggers a blue LED to signal an incoming call/text. The program in the PCB turns on a fading yellow LED that keeps fading on and off until the case is opened, so that the user is constantly reminded of the missed call or new text message. This would allow the user to keep track of their cell phone even in a quiet environment like a library, as it converts auditory feedback into visual feedback.</p>
<p><span id="more-1417"></span></p>
<p><strong>Process and Technical Problems:</strong></p>
<p>We both learned a lot in doing this project, from building  fabric PCBs and textile sensors to figuring out how to use them in an integrated textile circuit.  As part of the learning process, we made a phone case each, which was nice because our phones are not the same size.</p>
<p>We ran into problems early on in the project, with our AtTiny85 chip losing contact with the conductive fabric base several times . On one PCB, we resorted to burning a hole through the back of the fabric in order to solder the contact close. Programming was also tricky as we discovered that we were shorting out the PCB as our components were connected to the pins 1 and 2.</p>
<p>Inspired by Hannah&#8217;s sensor examples, we experimented with several crochet pressure sensors to pick up the vibrations of the phone. We went though many different sized sensors before settling on the one inside the case. The sensor is constructed of crocheted yarn in a patch the size of the phone. In the middle is a strip of conductive yarn mixed with wool yarn. There are positive and negative threads running though the sides of the sensor that are connected to the PCB to trigger the LEDs. Pressure on the conductive patch of the sensor would decrease the resistance of the path and hence make the signal at the PCB stronger. We used trial and error to &#8220;calibrate&#8221; the sensor. Before we resorted to trial and error, we made an attempt to draw data from the sensor. Quickly after starting we found that Println(); cannot be used with the AtTiny85 because it does not have the same hardware as the Arduino. Leah helped us with the software serial library in hope that it would allow for data to be read.  Unfortunately we could not make the speeds of the PCB and computer sync up and were not able to draw usable data.</p>
<p>Eventually, the sensor functioned in the way we intended and we started to map out the circuity and design the case. Once everything was sewed together we needed to re calibrate the sensor.  This is when things became tricky and the sensor finicky. Proof of concept has been achieved but currently the case is unreliable. We think that because the sensor is woven after some time the sensitivity changes because the fibers vibrate into a position that is not a sensitive and is more stretched out. Some of the unreliability may also be caused by the changes in voltage as the battery slowly loses it charge. However, the circuit still works when the case is squeezed.  In the future, we will consider using a sensor that is more suited to sensing vibrations, like a piezoelectric sensor, instead of a simple pressure sensor. However, we still think that the project was a success as we learned a lot from the process of making it.</p>
<p><strong>Images:</strong></p>
<p><span style="font-size: small;">To view us testing the sensors click here: </span><span style="font-size: small;"><span style="color: #000000;"><a style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; padding: 0px; margin: 0px;" href="http://www.youtube.com/watch?v=YtR3RHIZZE8" target="_new">http://www.youtube.com/watch?v=YtR3RHIZZE8</a></span></span></p>
<p><span style="font-size: small;"><span style="color: #000000;"><a style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; padding: 0px; margin: 0px;" href="http://www.youtube.com/watch?v=YtR3RHIZZE8" target="_new"></a></span></span><span style="font-size: small;"><span style="color: #000000;">Here is a video of the case working before sewed together </span></span><a style="font-size: 13px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #0033cc; text-decoration: none; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;" href="http://www.youtube.com/watch?v=_ZHjxvbGjWA" target="_new">http://www.youtube.com/watch?v=_ZHjxvbGjWA</a></p>
<p>Here is the final working product:</p>
<p><object width="425" height="349"><param name="movie" value="http://www.youtube.com/v/--UBR2ID0Uw?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/--UBR2ID0Uw?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="349"></embed></object></p>
<p>Here is the final working differently than intended:</p>
<p><object width="425" height="349"><param name="movie" value="http://www.youtube.com/v/gQuugZX0Ag4?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/gQuugZX0Ag4?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="349"></embed></object></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1419' title='Sensor 1'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Sensor_1_small.jpg" class="attachment-thumbnail" alt="Sensor 1" title="Sensor 1" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1420' title='Sensor 2'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Sensor_2_small.jpg" class="attachment-thumbnail" alt="Sensor 2" title="Sensor 2" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1421' title='Sensor3'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/sensor_3_small.jpg" class="attachment-thumbnail" alt="Sensor3" title="Sensor3" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1422' title='Closeup of PCB'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/PCB_withResin_small.jpg" class="attachment-thumbnail" alt="Closeup of PCB" title="Closeup of PCB" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1423' title='Sensor sewn to backing fabric'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/SensorSewnToFabric_small.jpg" class="attachment-thumbnail" alt="Sensor sewn to backing fabric" title="Sensor sewn to backing fabric" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1439' title='Crochet pressure sensor'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Sensor1_SewenToFabric_small.jpg" class="attachment-thumbnail" alt="Crochet pressure sensor" title="Crochet pressure sensor" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1441' title='Sewing and circuitry at back of sensor'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/BackOfSensor_small.jpg" class="attachment-thumbnail" alt="Sewing and circuitry at back of sensor" title="Sewing and circuitry at back of sensor" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1442' title='Battery pouch on inside of the case'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/BatteryPouch_small.jpg" class="attachment-thumbnail" alt="Battery pouch on inside of the case" title="Battery pouch on inside of the case" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1443' title='Sewing the PCB'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/SewingPCB_small.jpg" class="attachment-thumbnail" alt="Sewing the PCB" title="Sewing the PCB" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1444' title='Front of case with snap, PCB and blue LED'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/SnapWithLED_samll.jpg" class="attachment-thumbnail" alt="Front of case with snap, PCB and blue LED" title="Front of case with snap, PCB and blue LED" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1446' title='Testing Sensor'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/TestingSensor_small.jpg" class="attachment-thumbnail" alt="Testing Sensor" title="Testing Sensor" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1447' title='Maping Curcit'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MapingCurcit_small.jpg" class="attachment-thumbnail" alt="Maping Curcit" title="Maping Curcit" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1449' title='Mapping Circuit 2'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MappingCircut2_small.jpg" class="attachment-thumbnail" alt="Mapping Circuit 2" title="Mapping Circuit 2" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1450' title='Circut With Sensor'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/CircutWithSensor_small.jpg" class="attachment-thumbnail" alt="Circut With Sensor" title="Circut With Sensor" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1496' title='Final 1'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Final-1_small.jpg" class="attachment-thumbnail" alt="Final 1" title="Final 1" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1499' title='Final 2'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Final2_small.jpg" class="attachment-thumbnail" alt="Final 2" title="Final 2" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1497' title='Final 3'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Final3_small.jpg" class="attachment-thumbnail" alt="Final 3" title="Final 3" /></a>
</p>
<p></strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong><span style="font-size: small;">Code:</span></strong></p>
<div id="_mcePaste"><span style="font-size: small;">#include &lt;SoftwareSerial.h&gt;</span></div>
<div id="_mcePaste"><span style="font-size: small;">/*</span></div>
<div id="_mcePaste"><span style="font-size: small;">ButtonModFade</span></div>
<div><span style="font-size: small;">*/</span></div>
<div id="_mcePaste"><span style="font-size: small;">// constants won&#8217;t change. They&#8217;re used here to</span></div>
<div id="_mcePaste"><span style="font-size: small;">// set pin numbers:</span></div>
<div id="_mcePaste"><span style="font-size: small;">const int buttonPin = 2;     // the number of the crochet sensor pin</span></div>
<div id="_mcePaste"><span style="font-size: small;">// IMPT: if buttonPin=4, change analogRead to pin 2</span></div>
<div id="_mcePaste"><span style="font-size: small;">const int ledPin =  4;      // the number of the LED pin</span></div>
<div id="_mcePaste"><span style="font-size: small;">const int ledFade = 0;       // the number of the fading LED pin</span></div>
<div id="_mcePaste"><span style="font-size: small;">const int targetTime = 5000;  // time when fading LED is triggered</span></div>
<div id="_mcePaste"><span style="font-size: small;">// variables will change:</span></div>
<div id="_mcePaste"><span style="font-size: small;">int buttonState = 0;         // variable for reading the pushbutton status</span></div>
<div id="_mcePaste"><span style="font-size: small;">int timeCounter = 0;         // variable for triggering time delay</span></div>
<div id="_mcePaste"><span style="font-size: small;">int brightness = 0;    // how bright the LED is</span></div>
<div id="_mcePaste"><span style="font-size: small;">int fadeAmount = 3;    // how many points to fade the LED by</span></div>
<div id="_mcePaste"><span style="font-size: small;">void setup() {</span></div>
<div id="_mcePaste"><span style="font-size: small;">// initialize the LED pin as an output:</span></div>
<div id="_mcePaste"><span style="font-size: small;">pinMode(ledPin, OUTPUT);</span></div>
<div id="_mcePaste"><span style="font-size: small;">// initialize the crochet sensor pin as an input:</span></div>
<div id="_mcePaste"><span style="font-size: small;">pinMode(buttonPin, INPUT);</span></div>
<div id="_mcePaste"><span style="font-size: small;">// initialize fading LED as output</span></div>
<div id="_mcePaste"><span style="font-size: small;">pinMode(ledFade, OUTPUT);</span></div>
<div id="_mcePaste"><span style="font-size: small;">digitalWrite(buttonPin, HIGH);  // make high by default</span></div>
<div id="_mcePaste"><span style="font-size: small;">digitalWrite(ledFade, LOW);     // make fading LED low by default</span></div>
<div id="_mcePaste"><span style="font-size: small;">}</span></div>
<div id="_mcePaste"><span style="font-size: small;">void loop(){</span></div>
<div id="_mcePaste"><span style="font-size: small;">// read the state of the crochet sensor value:</span></div>
<div id="_mcePaste"><span style="font-size: small;">buttonState = analogRead(buttonPin-1);</span></div>
<div id="_mcePaste"><span style="font-size: small;">// check if the crochet sensor is pressed.</span></div>
<div id="_mcePaste"><span style="font-size: small;">// if it is, the buttonState is LOW:</span></div>
<div id="_mcePaste"><span style="font-size: small;">if (buttonState &gt;=170) { // this is the number that calibrates the sensor</span></div>
<div id="_mcePaste"><span style="font-size: small;">// turn LED on:</span></div>
<div id="_mcePaste"><span style="font-size: small;">digitalWrite(ledPin, LOW);</span></div>
<div id="_mcePaste"><span style="font-size: small;">// if time is not target time, reset time counter</span></div>
<div id="_mcePaste"><span style="font-size: small;">if (timeCounter &lt; targetTime) {</span></div>
<div id="_mcePaste"><span style="font-size: small;">timeCounter = 0;</span></div>
<div id="_mcePaste"><span style="font-size: small;">}</span></div>
<div id="_mcePaste"><span style="font-size: small;">}</span></div>
<div id="_mcePaste"><span style="font-size: small;">else {</span></div>
<div id="_mcePaste"><span style="font-size: small;">// turn LED on, increase time counter by 1:</span></div>
<div id="_mcePaste"><span style="font-size: small;">digitalWrite(ledPin, HIGH);</span></div>
<div id="_mcePaste"><span style="font-size: small;">timeCounter = timeCounter +1;</span></div>
<div id="_mcePaste"><span style="font-size: small;">}</span></div>
<div id="_mcePaste"><span style="font-size: small;">// if time &gt; target, start fading LED</span></div>
<div id="_mcePaste"><span style="font-size: small;">if (timeCounter &gt; targetTime) {</span></div>
<div id="_mcePaste"><span style="font-size: small;">analogWrite(ledFade, brightness);</span></div>
<div id="_mcePaste"><span style="font-size: small;">// change the brightness for next time through the loop:</span></div>
<div id="_mcePaste"><span style="font-size: small;">brightness = brightness + fadeAmount;</span></div>
<div id="_mcePaste"><span style="font-size: small;">// reverse the direction of the fading at the ends of the fade:</span></div>
<div id="_mcePaste"><span style="font-size: small;">if (brightness == 0 || brightness == 255) {</span></div>
<div id="_mcePaste"><span style="font-size: small;">fadeAmount = -fadeAmount ;</span></div>
<div id="_mcePaste"><span style="font-size: small;">}</span></div>
<div id="_mcePaste"><span style="font-size: small;">// wait for 30 milliseconds to see the dimming effect</span></div>
<div id="_mcePaste"><span style="font-size: small;">delay(30);</span></div>
<div id="_mcePaste"><span style="font-size: small;">}</span></div>
<div id="_mcePaste"><span style="font-size: small;">}</span></div>
<p><strong><br />
</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<div><strong><br />
</strong></div>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1417</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging the LilyPads</title>
		<link>http://newtextiles.media.mit.edu/?p=1353</link>
		<comments>http://newtextiles.media.mit.edu/?p=1353#comments</comments>
		<pubDate>Tue, 08 Mar 2011 12:46:03 +0000</pubDate>
		<dc:creator>ellann</dc:creator>
				<category><![CDATA[Fabric PCB]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1353</guid>
		<description><![CDATA[The concept for this project was to use a microcontroller with two outputs and two inputs to create a fun little game. We have a frog that is trying to catch the LED lit dragonfly. Each time the tongue of the frog is moved (by the user) to touch the lily pad right in front [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Overall_side_view" src="http://web.mit.edu/ellann/Public/newtextiles/overall_side_view.jpg" alt="" width="400" /> The concept for this project was to use a microcontroller with two outputs and two inputs to create a fun little game. We have a frog that is trying to catch the LED lit dragonfly. Each time the tongue of the frog is moved (by the user) to touch the lily pad right in front of the LED lit dragonfly that LED turns off and the other LED turns on. It is fun little game we call &#8220;Debugging the LilyPads.&#8221; <span id="more-1353"></span></p>
<p>How did we make this project? The details are laid out below.</p>
<p><img title="Illustrator" src="http://web.mit.edu/ellann/Public/newtextiles/pad.jpg" alt="" width="800"  /><br />
Firstly,  inspiration for all the pattern pieces were collected. The images were then traced  in Adobe Illustator as a means of producing templates for laser cutting.</p>
<p><img class="alignnone" title="Lilypad_etch" src="http://web.mit.edu/ellann/Public/newtextiles/lilypad_etching.jpg" alt="" width="800" height="600" /><br />
Every piece of felt (except the black background and the tongue) was cut out using a laser cutter. The lilypads turned out especially nicely; We were able to use the laser cutter at very low power and a high speed setting to produce etched lines as a means of describing leaf veins.</p>
<p><img class="alignnone" title="Flower_closeup" src="http://web.mit.edu/ellann/Public/newtextiles/flower_close_up.jpg" alt="" width="800" height="600" /><br />
We sewed the various pieces together &#8211; first, off the base mat and then onto the base mat. This is one of the flowers done. It is three layers of different colors and diminishing size that are sewn together in the middle. The flower was then folded in half and the middle sewed again and then folded in half the other way and sewed again for the 3D effect.</p>
<p><img class="alignnone" title="Flower Sewing" src="http://web.mit.edu/ellann/Public/newtextiles/flower_sewing.jpg" alt="" width="800" height="600" /><br />
Then, the various pieces were sewn to the mat &#8211; a flower example is shown above.</p>
<p><img class="alignnone" title="Frog" src="http://web.mit.edu/ellann/Public/newtextiles/frog.jpg" alt="" width="800" height="600" /><br />
We also sewed a stuff frog. The dots on its back are also etched on. We cut to identical frog shapes, sewed them right sides together, and then flipped him inside and stuffed him. Here we are sewing him to the mat.</p>
<p><img class="alignnone" title="Dragonfly" src="http://web.mit.edu/ellann/Public/newtextiles/dragonfly.jpg" alt="" width="800" height="600" /><br />
Here is a close up of one of the dragonflies with and LED on it&#8217;s back. We used tiny LEDs that have the positive and negative leads soldered to little beads which are used to attached the LED to the fabric.</p>
<p><img class="alignnone" title="embroidery" src="http://web.mit.edu/ellann/Public/newtextiles/lilypad_and_tongue_embroidery.jpg" alt="" width="800" height="600" /><br />
The lilypads were special. Each of them had heat sensitive glue on the back and they were each ironed onto the mat. The two lilypads that were going to be part of our buttons/sensors were embroidered along the veins with conductive thread. The tongue was also embroidered along the underside.</p>
<p><img class="alignnone" title="overall_top" src="http://web.mit.edu/ellann/Public/newtextiles/overall_top_view.jpg" alt="" width="800" height="600" /><br />
The finished product looks like so.</p>
<p><a href="http://newtextiles.media.mit.edu/?attachment_id=1631" rel="attachment wp-att-1631"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_2108-800x600.jpg" alt="" title="IMG_2108 (800x600)" width="800" height="600" class="alignleft size-full wp-image-1631" /></a><br />
All of the circuitry is done on the underside of the mat. </p>
<p><a href="http://newtextiles.media.mit.edu/?attachment_id=1630" rel="attachment wp-att-1630"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_2110-800x600.jpg" alt="" title="IMG_2110 (800x600)" width="800" height="600" class="alignleft size-full wp-image-1630" /></a><br />
Everything attaches to the microprocessor. </p>
<p>Arduino Code:</p>
<blockquote><p>// constants won&#8217;t change. They&#8217;re used here to<br />
// set pin numbers:<br />
const int buttonPin_LilyPad1 = 1;     // Lily Pad 1&#8242;s button goes to pin 1<br />
const int buttonPin_LilyPad2 = 2;     // Lily Pad 2&#8242;s button goes to pin 1<br />
const int ledPin_LilyPad1 =  3;      // Lily Pad 1&#8242;s led goes to pin 3<br />
const int ledPin_LilyPad2 =  4;      // Lily Pad 2&#8242;s led goes to pin 4</p>
<p>// variables will change:<br />
int buttonState_LilyPad1 = 0;         // variable for reading the pushbutton status<br />
int buttonState_LilyPad2 = 0;         // variable for reading the pushbutton status<br />
int lastButtonState_LilyPad1 = 0;     // previous state of the button<br />
int lastButtonState_LilyPad2 = 0;     // previous state of the button</p>
<p>void setup() {<br />
// initialize the LED pin as an output:<br />
pinMode(ledPin_LilyPad1, OUTPUT);<br />
pinMode(ledPin_LilyPad2, OUTPUT);<br />
// initialize the pushbutton pin as an input:<br />
pinMode(buttonPin_LilyPad1, INPUT);<br />
pinMode(buttonPin_LilyPad2, INPUT);</p>
<p>digitalWrite(buttonPin_LilyPad1, HIGH);<br />
digitalWrite(buttonPin_LilyPad2, HIGH);<br />
}</p>
<p>void loop(){<br />
// read the state of the pushbutton value:<br />
buttonState_LilyPad1 = digitalRead(buttonPin_LilyPad1);<br />
buttonState_LilyPad2 = digitalRead(buttonPin_LilyPad2);</p>
<p>// compare the buttonState to its previous state<br />
if (buttonState_LilyPad1 != lastButtonState_LilyPad1) {<br />
// if the state has changed, change the lights<br />
digitalWrite(ledPin_LilyPad1, LOW);<br />
digitalWrite(ledPin_LilyPad2, HIGH);<br />
}<br />
else {<br />
}<br />
if (buttonState_LilyPad2 != lastButtonState_LilyPad2) {<br />
// if the state has changed, change the lights<br />
digitalWrite(ledPin_LilyPad1, HIGH);<br />
digitalWrite(ledPin_LilyPad2, LOW);<br />
}<br />
else {<br />
}</p>
<p>lastButtonState_LilyPad1 = buttonState_LilyPad1;<br />
lastButtonState_LilyPad2 = buttonState_LilyPad2;<br />
}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1353</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fabric PCB</title>
		<link>http://newtextiles.media.mit.edu/?p=1108</link>
		<comments>http://newtextiles.media.mit.edu/?p=1108#comments</comments>
		<pubDate>Tue, 01 Mar 2011 18:03:26 +0000</pubDate>
		<dc:creator>leah buechley</dc:creator>
				<category><![CDATA[Assignments]]></category>
		<category><![CDATA[Fabric PCB]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1108</guid>
		<description><![CDATA[Due: Tuesday, March 8, 2011 See student fabric PCBs here For this assignment you will work in pairs to create an artifact that includes a fabric PCB. The artifact should include an ATtiny85 microcontroller, at least two outputs and at least one digital (switch) input. Projects from last year&#8217;s class can be found here. Teams [...]]]></description>
			<content:encoded><![CDATA[<p>Due: Tuesday, March 8, 2011<br />
<a href="http://newtextiles.media.mit.edu/?cat=15">See student fabric PCBs here</a></p>
<p>For this assignment you will work in pairs to create an artifact that includes a fabric PCB. The artifact should include an ATtiny85 microcontroller, at least two outputs and at least one digital (switch) input.  Projects from last year&#8217;s class can be found <a href="http://newtextiles.media.mit.edu/2010/pmwiki.php?n=Main.FabricPCB">here</a>.</p>
<p>Teams for this assignment are listed below. With your team you should create a post that documents your project and add it to the Fabric PCB category. Your page should include pictures&#8211;including at least one close up of your PCB and one image that shows the entire project&#8211;a paragraph about your experience, and the Arduino code for your project. Also create a short video of your project in action. Post the video online (vimeo, youtube, etc.) and embed the video in your documentation page.</p>
<p>Bring your project to class on March 8 for demonstrations.</p>
<p><strong>Extra Lab Help + Hours</strong><br />
My student David Mellis will be available from 3-6pm on Friday March 4 to help with Arduino programming.  We&#8217;ll have extra lab hours from 12-6 on Saturday March 5th.  </p>
<p><strong>Teams</strong><br />
Albert Ching and Maria Anna Stangel<br />
Ellann Cohen and Dena Molnar<br />
Heidi Chen and Nicole Tariveridan<br />
Judy (Zheng) Jia and Ilan Moyer<br />
Sheralyn Woon and Crystal Ray</p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1108</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
