<?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; Textile Sensor</title>
	<atom:link href="http://newtextiles.media.mit.edu/?feed=rss2&#038;cat=17" 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&#8217;s Pressures.</title>
		<link>http://newtextiles.media.mit.edu/?p=2087</link>
		<comments>http://newtextiles.media.mit.edu/?p=2087#comments</comments>
		<pubDate>Mon, 25 Apr 2011 16:52:37 +0000</pubDate>
		<dc:creator>maria.stangel</dc:creator>
				<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=2087</guid>
		<description><![CDATA[I wanted to make a presaure sensors that would give a smooth data to the computer. First I used two kinds of the resistive thread and knited with them on the small knitting mashine. The effect was very good, I was surprised how fast and easy it was to make a sensor. The resistance changed [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center">
<p style="text-align: center">
<p style="text-align: center"><a rel="attachment wp-att-2090" href="http://newtextiles.media.mit.edu/?attachment_id=2090"><img class="size-full wp-image-2090 aligncenter" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_0606.jpg" alt="" width="576" height="432" /></a></p>
<p style="text-align: left"><span id="more-2087"></span></p>
<p style="text-align: left">I wanted to make a presaure sensors that would give a smooth data to the computer. First I used two kinds of the resistive thread and knited with them on the small knitting mashine. The effect was very good, I was surprised how fast and easy it was to make a sensor. The resistance changed according to strech of the knitted piece. I started to work on a second sensor to compare the effects from difefrent materials. For the second pressure sensor I used felted wool mixed with aluminium yarn and resistive thread. The sensor gives &#8220;jumping&#8221; data and it is very hard to press, felt become very thick, I used two metal hooks to make a contact points for alighator clips. My last experiment was to use a conductive in and paint. I dyed a two pieces of sponge one using a coper paint mixed with violet dying paint, second with a conductive ink (carbon based). The coper paint was giving much better results at the beginning, but over night it lost some of it&#8217;s properties. I sewed in some small pieces of conductive thread to gain a better conductivity, but after my modification the sensor started to work like a on/offswitch. I&#8217;ve realized that the sponge had a better conductivity when it was still wet. I put some watter on my dry sensor and it gave some interesting resutlts – according to my graph it looked like  aline on the middle of my screen which means that the data should be exactly in the middle of 1023 range.</p>
<p style="text-align: left"><strong>Arduino:</strong></p>
<p style="text-align: left"><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p style="text-align: left"><span style="font-weight: normal">void setup() {</span></p>
<p style="text-align: left"><span style="font-weight: normal"> // initialize the serial communication:</span></p>
<p style="text-align: left"><span style="font-weight: normal"> Serial.begin(9600);</span></p>
<p style="text-align: left"><span style="font-weight: normal"> digitalWrite(A0,HIGH);</span></p>
<p style="text-align: left"><span style="font-weight: normal">//  digitalWrite(A1,HIGH);</span></p>
<p style="text-align: left"><span style="font-weight: normal">}</span></p>
<p style="text-align: left"><span style="font-weight: normal">void loop() {</span></p>
<p style="text-align: left"><span style="font-weight: normal">// send the value of analog input 0:</span></p>
<p style="text-align: left"><span style="font-weight: normal"> Serial.println(analogRead(A0));</span></p>
<p style="text-align: left"><span style="font-weight: normal"> // wait a bit for the analog-to-digital converter </span><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p style="text-align: left"><span style="font-weight: normal">to stabilize after the last reading:</span></p>
<p style="text-align: left"><span style="font-weight: normal"> delay(50);</span></p>
<p style="text-align: left"><span style="font-weight: normal"> //Serial.println(analogRead(A1));</span></p>
<p style="text-align: left"><span style="font-weight: normal"> delay(10);</span></p>
<p style="text-align: left"><span style="font-weight: normal">}</span></p>
<p style="text-align: left">
<p style="text-align: left"><strong>Processing :</strong></p>
<p style="text-align: left">
<div>import processing.serial.*;</div>
<div>Serial myPort;        // The serial port</div>
<div>float weight = .05;</div>
<div>int xPos = 20; // horizontal position of the graph</div>
<div>int lastX, lastY;</div>
<div>void setup () {</div>
<div>// set the window size:</div>
<div>size(800, 600);</div>
<div>//smooth the graphics</div>
<div>smooth();</div>
<div>lastX = xPos;</div>
<div>background(0);</div>
<div>// List all the available serial ports</div>
<div>println(Serial.list());</div>
<div>// I know that the first port in the serial list on my mac</div>
<div>// is always my  Arduino, so I open Serial.list()[0].</div>
<div>// Open whatever port is the one you&#8217;re using.</div>
<div>myPort = new Serial(this, Serial.list()[0], 9600);</div>
<div>// don&#8217;t generate a serialEvent() unless you get a newline character:</div>
<div>myPort.bufferUntil(&#8216;\n&#8217;);</div>
<div>// set inital background:</div>
<div>}</div>
<div>void draw () {</div>
<div>// everything happens in the serialEvent()</div>
<div>}</div>
<div>void serialEvent (Serial myPort) {</div>
<div>// get the ASCII string:</div>
<div>String inString = myPort.readStringUntil(&#8216;\n&#8217;);</div>
<div>if (inString != null) {</div>
<div>// trim off any whitespace:</div>
<div>inString = trim(inString);</div>
<div>// convert to an int and map to the screen height:</div>
<div>float inByte = float(inString);</div>
<div>inByte = map(inByte, 0, 1023, 0, height);</div>
<div>noStroke();</div>
<div>fill(#FFA500,inByte-10);</div>
<div>ellipseMode(CENTER);</div>
<div>ellipse(xPos,inByte, 20, 20 );</div>
<div>fill(#3366FF,inByte-10);</div>
<div>ellipseMode(CENTER);</div>
<div>ellipse(xPos,height-inByte&#8211;, 20, 20 );</div>
<div>stroke(#FFA500,inByte-10);</div>
<div>strokeWeight(.5);</div>
<div>line(0, 300,xPos,inByte-10);</div>
<div>weight = .15;</div>
<div>stroke(#3366FF,inByte-10);</div>
<div>strokeWeight(.5);</div>
<div>line(0, 300,xPos,height-inByte+10);</div>
<div>weight = .15;</div>
<div>}</div>
<div>// at the edge of the screen, go back to the beginning:</div>
<div>if (xPos &gt;= width) {</div>
<div>xPos = 0;</div>
<div>background(0);</div>
<div>}</div>
<div>else {</div>
<div>// increment the horizontal position:</div>
<div>xPos++;</div>
<div>}</div>
<div>}</div>
<p>import processing.serial.*;Serial myPort;        // The serial portfloat weight = .05;<br />
int xPos = 20; // horizontal position of the graphint lastX, lastY;void setup () {<br />
// set the window size:  size(800, 600);   //smooth the graphics    smooth();  lastX = xPos;  background(0);  // List all the available serial ports  println(Serial.list());  // I know that the first port in the serial list on my mac  // is always my  Arduino, so I open Serial.list()[0].  // Open whatever port is the one you&#8217;re using.  myPort = new Serial(this, Serial.list()[0], 9600);  // don&#8217;t generate a serialEvent() unless you get a newline character:  myPort.bufferUntil(&#8216;\n&#8217;);  // set inital background:    }  void draw () {  // everything happens in the serialEvent()  }<br />
void serialEvent (Serial myPort) {  // get the ASCII string:  String inString = myPort.readStringUntil(&#8216;\n&#8217;);<br />
if (inString != null) {    // trim off any whitespace:    inString = trim(inString);    // convert to an int and map to the screen height:    float inByte = float(inString);     inByte = map(inByte, 0, 1023, 0, height);</p>
<p>noStroke();<br />
fill(#FFA500,inByte-10);    ellipseMode(CENTER);    ellipse(xPos,inByte, 20, 20 );</p>
<p>fill(#3366FF,inByte-10);    ellipseMode(CENTER);    ellipse(xPos,height-inByte&#8211;, 20, 20 );<br />
stroke(#FFA500,inByte-10);  strokeWeight(.5);  line(0, 300,xPos,inByte-10);  weight = .15;<br />
stroke(#3366FF,inByte-10);  strokeWeight(.5);  line(0, 300,xPos,height-inByte+10);  weight = .15;<br />
}</p>
<p>// at the edge of the screen, go back to the beginning:    if (xPos &gt;= width) {      xPos = 0;      background(0);    }     else {      // increment the horizontal position:      xPos++;    }       }</p>

<a href='http://newtextiles.media.mit.edu/?attachment_id=2092' title='IMG_0615'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_0615.jpg" class="attachment-thumbnail" alt="IMG_0615" title="IMG_0615" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2096' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="81" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4200013.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2099' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4200033.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2105' title='Screen shot 2011-03-29 at 9.55.53 AM'><img width="150" height="117" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Screen-shot-2011-03-29-at-9.55.53-AM.png" class="attachment-thumbnail" alt="Screen shot 2011-03-29 at 9.55.53 AM" title="Screen shot 2011-03-29 at 9.55.53 AM" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2091' title='IMG_0611'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_0611.jpg" class="attachment-thumbnail" alt="IMG_0611" title="IMG_0611" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2089' title='IMG_0604'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_0604.jpg" class="attachment-thumbnail" alt="IMG_0604" title="IMG_0604" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2101' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4200036.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2093' title='IMG_0616'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_0616.jpg" class="attachment-thumbnail" alt="IMG_0616" title="IMG_0616" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2090' title='IMG_0606'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_0606.jpg" class="attachment-thumbnail" alt="IMG_0606" title="IMG_0606" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2100' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4200034.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2104' title='Screen shot 2011-03-29 at 9.53.38 AM'><img width="150" height="111" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Screen-shot-2011-03-29-at-9.53.38-AM.png" class="attachment-thumbnail" alt="Screen shot 2011-03-29 at 9.53.38 AM" title="Screen shot 2011-03-29 at 9.53.38 AM" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2098' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4200028.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2102' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4200039.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2097' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4200014.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2095' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="119" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4200005.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2088' title='IMG_0600'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_0600.jpg" class="attachment-thumbnail" alt="IMG_0600" title="IMG_0600" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2103' title='OLYMPUS DIGITAL CAMERA'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/P4210054.jpg" class="attachment-thumbnail" alt="OLYMPUS DIGITAL CAMERA" title="OLYMPUS DIGITAL CAMERA" /></a>

<p>Demo videos:</p>
<p><a href="http://www.youtube.com/watch?v=8PvsofruqQE">01 Strech Sensor</a></p>
<p><a href="http://www.youtube.com/watch?v=P0PVA1LNRWc">02 Pressure Sensor </a></p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=2087</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Superman x-y sensor</title>
		<link>http://newtextiles.media.mit.edu/?p=2265</link>
		<comments>http://newtextiles.media.mit.edu/?p=2265#comments</comments>
		<pubDate>Wed, 06 Apr 2011 04:54:32 +0000</pubDate>
		<dc:creator>KristyKat</dc:creator>
				<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=2265</guid>
		<description><![CDATA[I created a touchpad sensor from conductive thread, fabric and the lilypad. Prototypes Prior to creating the sensor, I had several prototypes. General Technique Description: Each prototype is composed of knitted swatches that include conductive thread. With a darning needle, I sewed strips of highly conductive thread along two edges. The two edges were then [...]]]></description>
			<content:encoded><![CDATA[<p>I created a touchpad sensor from conductive thread, fabric and the lilypad.</p>
<p><span id="more-2265"></span><strong> </strong></p>
<p><strong>Prototypes</strong></p>
<p>Prior to creating the sensor, I had several prototypes.</p>
<p><a rel="attachment wp-att-2271" href="http://newtextiles.media.mit.edu/?attachment_id=2271"><img class="alignleft size-full wp-image-2271" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/04/DSCN3569b.jpg" alt="" width="800" height="600" /></a></p>
<p><span style="text-decoration: underline"><strong>General Technique Description:</strong></span> Each prototype is composed of knitted swatches that include conductive thread. With a darning needle, I sewed strips of highly conductive thread along two edges. The two edges were then connected to A0 and A1 ports of the Lilypad Arduino. The A0 and A1 corresponded to measuring the resistances along the y and x axes, respectively.</p>
<p><span style="text-decoration: underline"><strong>Sensor 1</strong></span>: I handknitted sensor 1. Initial testing of this sensor showed that the resistance in the y direction (direction of knit) had small-almost-non-detectable changes while the resistance in the x direction (knitted rows) had somewhat larger changes, but not enough to reliably detect which side the finger glove was on.</p>
<p><span style="text-decoration: underline"><strong>Sensors 2 -3:</strong></span> So, I created larger sensors ( 2 and 3 ) with the knitting machine at a smaller guage. Sensor 3 measured approximately 3&#8243; x 4&#8243;.  Initial test of this sensor showed more changes in resistance, but, before completely testing this sensor thoroughly for possible implications of fabrication &#8212; I made a another bigger sensor.</p>
<p><a rel="attachment wp-att-2282" href="http://newtextiles.media.mit.edu/?attachment_id=2282"><img class="alignleft size-full wp-image-2282" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/04/DSCN3570.jpg" alt="" width="800" height="600" /></a></p>
<p><span style="text-decoration: underline"><strong>Sensor 4:</strong></span> This sensor measured approximately 6&#8243;x6&#8243;. At the time that I made this sensor, I could better detect the changes in resistance in x and y directions.</p>
<p><span style="text-decoration: underline"><strong>Problems:</strong></span> To detect the changes in resistance in the x and y directions, I initially kept creating larger sensors. In testing sensors 3-4, however, I realized that my fabrication method was creating additional problems. The combination of knitting non-conductive with conductive thread resulted in a partial display of the conductive thread. This discontinuity would result in inaccurate measurements (i.e. lower resistance would be read in areas distant from the axis because more conductive thread was showing and vice versa).This discontinuity can be better seen in sensors 1-3.</p>
<p><span style="text-decoration: underline"><strong>Superman Sensor:</strong></span></p>
<p>So, I decided to create another sensor that had a more uniform conductive-thread fabrication. Using a knitting machine, I knitted conductive thread which I then (attempted) to uniformly stretch over felt fabric.</p>
<p><a rel="attachment wp-att-2267" href="http://newtextiles.media.mit.edu/?attachment_id=2267"><img class="alignleft size-full wp-image-2267" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/04/DSCN35741.jpg" alt="" width="800" height="600" /></a></p>
<p>This sensor, however, still had problems. This may again be due to imperfections in the fabrication such as discontinuity in the knitting, the uneven contact with the conductive fabric, and non-smooth felt fabric surface.  However, through this sensor, I was able to build more code in arduino and processing for detecting the x and y coordinates. See <a href="http://www.youtube.com/watch?v=KNVc293BKY0"><strong>YouTube video</strong> </a></p>
<p><span style="text-decoration: underline"><strong>Arduino Code:</strong></span></p>
<p>void setup() {<br />
// initialize the serial communication:<br />
Serial.begin(9600);<br />
analogReference(INTERNAL);<br />
digitalWrite(A0, HIGH);<br />
digitalWrite(A1, HIGH);<br />
}</p>
<p>void loop() {<br />
// send the value of analog input 0:<br />
Serial.print(analogRead(A0)); //Y-axis<br />
Serial.print(&#8220;\t&#8221;);<br />
Serial.println(analogRead(A1)); //x-axis<br />
// wait a bit for the analog-to-digital converter<br />
// to stabilize after the last reading:<br />
delay(10);</p>
<p>}</p>
<p><span style="text-decoration: underline"><strong>Processing Code</strong></span>:</p>
<p>// Graphing sketch</p>
<p>// This program takes ASCII-encoded strings<br />
// from the serial port at 9600 baud and graphs them. It expects values in the<br />
// range 0 to 1023, followed by a newline, or newline and carriage return</p>
<p>// Created 20 Apr 2005<br />
// Updated 18 Jan 2008<br />
// by Tom Igoe<br />
// This example code is in the public domain.</p>
<p>PImage front, back, superman, superman2, superman3;</p>
<p>import processing.serial.*;</p>
<p>Serial myPort;        // The serial port<br />
int xPos = 1;         // horizontal position of the graph<br />
float oldinByte = 0;  // previous inByte value<br />
float inByteX = 0;<br />
float newinByteX = 0;<br />
float origInByteX = 0; // intial inByte value before mapping/scaling</p>
<p>float inByteY = 0;   //inital x position for plotting<br />
float newinByteY = 0;   //inital x position for plotting<br />
float origInByteY = 0; // intial inByte value before mapping/scaling</p>
<p>//for AVERAGING<br />
int numReadings = 15;<br />
int index = 0;                  // the index of the current reading</p>
<p>float[] readingsX = new float[numReadings];      // the readings from the analog input<br />
float totalX = 0;                  // the running total<br />
float averageX = 0;                // the average</p>
<p>float[] readingsY = new float[numReadings];      // the readings from the analog input<br />
float totalY = 0;                  // the running total<br />
float averageY = 0;                // the average</p>
<p>void setup () {<br />
// set the window size:<br />
size(600, 600);<br />
back = loadImage(&#8220;supercity-background.jpg&#8221;);  // Load an image into the program<br />
superman3 = loadImage(&#8220;superman3.gif&#8221;);</p>
<p>// List all the available serial ports<br />
println(Serial.list());<br />
myPort = new Serial(this, Serial.list()[0], 9600);<br />
myPort.bufferUntil(&#8216;\n&#8217;);   // don&#8217;t generate a serialEvent() unless you get a newline character:<br />
background(0); // set inital background:</p>
<p>}</p>
<p>void draw () {<br />
// everything happens in the serialEvent()</p>
<p>}</p>
<p>void serialEvent (Serial myPort) {</p>
<p>translate(0, 600);<br />
// get the ASCII string:<br />
String inStringY = myPort.readStringUntil(&#8216;\t&#8217;);<br />
String inStringX = myPort.readStringUntil(&#8216;\n&#8217;);</p>
<p>if (inStringY != null) {<br />
inStringX = trim(inStringX);<br />
inStringY = trim(inStringY);</p>
<p>inByteX = float(inStringX);  //set inbyte value from reading<br />
inByteY = float(inStringY);  //set inbyte value from reading<br />
origInByteX = inByteX;<br />
origInByteY = inByteY;</p>
<p>String inByteValX = &#8220;&#8221; + inByteX;<br />
String inByteValY = &#8220;&#8221; + inByteY;</p>
<p>//Test to make sure I&#8217;m getting both values from A0 and A1<br />
print(&#8220;  &#8221; + inByteValX);<br />
print(&#8220;  &#8221; + inByteValY);<br />
print(&#8220;\n&#8221;);</p>
<p>/********** remap X &amp; Y values ***************/<br />
inByteX = map(inByteX, 0, 1023, 0, width); //x position<br />
inByteY = map(inByteY, 0, 1023, 0, height); //y position</p>
<p>//highest x value seems to be about 50<br />
//lowest x value seems to be about  20<br />
//neded to map between these values<br />
if(inByteX &gt; 50) {<br />
inByteX = 50;<br />
}<br />
if (inByteX &lt; 20) {<br />
inByteX = 20;<br />
}<br />
newinByteX = round(map(inByteX, 20,50, 0, width)); //x position for plotting</p>
<p>//highest y value seems to be about 80<br />
//lowest y value seems to be about 20<br />
//neded to map between these values<br />
if(inByteY &gt; 80) {<br />
inByteY = 80;<br />
}<br />
if (inByteY &lt; 20) {<br />
inByteY = 20;<br />
}<br />
newinByteY = map(inByteY, 20,80, 0, height); //x position for plotting<br />
//newinByteY = -newinByteY; //make negative for graphing purposes<br />
newinByteY = round(newinByteY*-1);</p>
<p>//Test to make sure I&#8217;m getting both values from A0 and A1<br />
/*String inByteValX = &#8220;&#8221; + inByteX + &#8220;  (&#8220;+newinByteX +&#8221;)  &#8220;;<br />
String inByteValY = &#8220;&#8221; + inByteY  + &#8220;  (&#8220;+newinByteY +&#8221;)  &#8220;;<br />
print(&#8220;  &#8221; + inByteValX);<br />
print(&#8220;  &#8221; + inByteValY);<br />
print(&#8220;\n&#8221;);*/</p>
<p>/*************/<br />
//take the average of prevoius 10<br />
//output position</p>
<p>// VARIABLES:<br />
//  newinByteX, newinByteY<br />
//  readingsX[numReadings], totalX , averageX<br />
//  readingsY[numReadings], totalY , averageY</p>
<p>//store values into an array<br />
readingsX[index] = newinByteX;<br />
readingsY[index] = newinByteY;</p>
<p>totalX = totalX + readingsX[index];  //calculate totals X<br />
totalY = totalY + readingsY[index];  //calculate totals Y</p>
<p>index = index + 1;</p>
<p>//when reach 10, DO<br />
if (index &gt;= numReadings) {</p>
<p>averageX = totalX / numReadings;<br />
averageY = totalY / numReadings;</p>
<p>String testX = &#8220;&#8221; + averageX;<br />
String testY = &#8220;&#8221; + averageY;</p>
<p>print(&#8220;  index set to 0&#8243;);<br />
print(&#8220;     &#8220;+testX+&#8221; &#8220;+testY + &#8220;\n&#8221;);</p>
<p>index = 0;<br />
totalX = 0;<br />
totalY = 0;<br />
}<br />
/*************/</p>
<p>String inByteVals = &#8220;    &#8220;+averageX+&#8221;, &#8220;+averageY;<br />
text(inByteVals, averageX, averageY);  //show x &amp; y value value<br />
stroke(0,0,0);<br />
text(inByteVals, averageX, averageY); //erase text</p>
<p>image(superman3, averageX, averageY);<br />
text(inByteVals, averageX, averageY);</p>
<p>delay(10);<br />
//background(0);<br />
image(back, 0, 0);</p>
<p>}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=2265</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yarn Characterization Machine</title>
		<link>http://newtextiles.media.mit.edu/?p=2374</link>
		<comments>http://newtextiles.media.mit.edu/?p=2374#comments</comments>
		<pubDate>Tue, 05 Apr 2011 16:24:38 +0000</pubDate>
		<dc:creator>imoyer@mit.edu</dc:creator>
				<category><![CDATA[Final Project Proposal]]></category>
		<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=2374</guid>
		<description><![CDATA[I propose building an automated desktop device which is capable of simultaneously measuring a yarn&#8217;s changes in tension and resistance in response to stretch. Because it is computer-controlled, the device will also be able to determine the consistency of these measurements as well as the effects of cyclic loading and fatigue. Armed with the data [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-2375" href="http://newtextiles.media.mit.edu/?attachment_id=2375"><img class="aligncenter size-full wp-image-2375" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/04/yarnsensor.jpg" alt="" width="600" height="403" /></a></p>
<p>I propose building an automated desktop device which is capable of simultaneously measuring a yarn&#8217;s changes in tension and resistance in response to stretch. Because it is computer-controlled, the device will also be able to determine the consistency of these measurements as well as the effects of cyclic loading and fatigue. Armed with the data collected by this machine, I&#8217;d like to be able to design the properties of braided yarns created using the Interweave CNC Braiding Machine based on the measured properties of its constituents.</p>
<p><a rel="attachment wp-att-2378" href="http://newtextiles.media.mit.edu/?attachment_id=2378">finalproposal</a></p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=2374</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sensor Experiments</title>
		<link>http://newtextiles.media.mit.edu/?p=2215</link>
		<comments>http://newtextiles.media.mit.edu/?p=2215#comments</comments>
		<pubDate>Thu, 31 Mar 2011 19:54:58 +0000</pubDate>
		<dc:creator>denamolnar</dc:creator>
				<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=2215</guid>
		<description><![CDATA[For this weeks project, I experimented with a variety of methods for producing  textile sensors with varying degrees of resistance. Each sensor is activated through a unique means of tactile interaction, be it stretching, pressing or bending.  The sensors were then connected to an Arduino to read their data. The data was then represented visually [...]]]></description>
			<content:encoded><![CDATA[<p>For this weeks project, I experimented with a variety of methods for producing  textile sensors with varying degrees of resistance. Each sensor is activated through a unique means of tactile interaction, be it stretching, pressing or bending.  The sensors were then connected to an Arduino to read their data. The data was then represented visually via a simple program written in Processing. It was interesting to see how each prototype produced different visual results!</p>
<p><strong>Knit Stretch Sensor</strong>- This sensor was produced on the knitting machine using a conductive and non conductive yarn. When stretched taut, the conductive material aligns to produce a lower level of resistance.</p>
<p><a rel="attachment wp-att-2218" href="http://newtextiles.media.mit.edu/?attachment_id=2218"><img class="aligncenter size-full wp-image-2218" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/stretchsensor.jpg" alt="" width="438" height="292" /></a></p>
<p><strong>Felted Pressure Sensor-</strong></p>
<p>This sensor was produced by first combing together  natural and conductive roving. The blend was then felted together and shaped into a soft round pad that could be squeezed or pressed into with ones fingers. I also sewed a round felt pocket with openings on both sides. This serves as a protective shell for the padding, as well as provides an area for the alligator clips (that run to the Arduino) to connect to.</p>
<p><a rel="attachment wp-att-2223" href="http://newtextiles.media.mit.edu/?attachment_id=2223"><img class="aligncenter size-full wp-image-2223" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/pressuresensor.jpg" alt="" width="511" height="341" /></a></p>
<p>Here is an image of the felt padding being slipped into the protective pocket</p>
<p><a rel="attachment wp-att-2230" href="http://newtextiles.media.mit.edu/?attachment_id=2230"><img class="aligncenter size-full wp-image-2230" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/pressuresensor2.jpg" alt="" width="511" height="341" /></a></p>
<p>Once inserted, alligator clips are attached to opposite ends of the pocket &#8220;mouth&#8221;, making contact with the conductive padding. Pressing the sensor reduces resistance that can be read on screen via Processing.</p>
<p><a rel="attachment wp-att-2232" href="http://newtextiles.media.mit.edu/?attachment_id=2232"><img class="aligncenter size-full wp-image-2232" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/pressuresensor4.jpg" alt="" width="511" height="341" /></a></p>
<p><strong>Bend Sensor</strong>-</p>
<p>This sensor was produced by inserting 2 layers of Velostat into a felt pocket that was then sewn closed. Velostat is a material that decreases in resistance when pressed or bent.</p>
<p><a rel="attachment wp-att-2227" href="http://newtextiles.media.mit.edu/?attachment_id=2227"><img class="aligncenter size-full wp-image-2227" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/bendsensor.jpg" alt="" width="511" height="341" /></a></p>
<p>Bending the sensor&#8230;</p>
<p><a rel="attachment wp-att-2228" href="http://newtextiles.media.mit.edu/?attachment_id=2228"><img class="aligncenter size-full wp-image-2228" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/bendsensor2.jpg" alt="" width="511" height="341" /></a></p>
<p>Below are videos of the visual information produced when physically interacting with the sensors&#8230;</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/3yiClXodQqw?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/3yiClXodQqw?version=3" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/wt6zakUrSHY?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/wt6zakUrSHY?version=3" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>Arduino Code</strong></p>
<p><strong> </strong></p>
<div>void setup() {</div>
<div>// initialize the serial communication:</div>
<div>Serial.begin(9600);</div>
<div>digitalWrite (A0, HIGH);</div>
<div>}</div>
<div>void loop() {</div>
<div>// send the value of analog input 0:</div>
<div>Serial.println(analogRead(A0));</div>
<div>// wait a bit for the analog-to-digital converter</div>
<div>// to stabilize after the last reading:</div>
<div>delay(100);</div>
<div>}</div>
<p>void setup() {</p>
<p>// initialize the serial communication:  Serial.begin(9600);  digitalWrite (A0, HIGH);}<br />
void loop() {</p>
<p>// send the value of analog input 0:  Serial.println(analogRead(A0));</p>
<p>// wait a bit for the analog-to-digital converter   // to stabilize after the last reading:  delay(100);}</p>
<p><strong>Processing Code for this Example</strong> (you must copy and past this into your Processing sketch)</p>
<p>/* Processing code for this example</p>
<p>// Graphing sketch</p>
<p>// This program takes ASCII-encoded strings</p>
<p>// from the serial port at 9600 baud and graphs them. It expects values in the</p>
<p>// range 0 to 1023, followed by a newline, or newline and carriage return</p>
<p>// Created 20 Apr 2005</p>
<p>// Updated 18 Jan 2008</p>
<p>// by Tom Igoe</p>
<p>// This example code is in the public domain.</p>
<p>import processing.serial.*;</p>
<p>Serial myPort;        // The serial port</p>
<p>int xPos = 1;         // horizontal position of the graph</p>
<p>void setup () {</p>
<p>// set the window size:</p>
<p>size(400, 300);</p>
<p>// List all the available serial ports</p>
<p>println(Serial.list());</p>
<p>// I know that the first port in the serial list on my mac</p>
<p>// is always my  Arduino, so I open Serial.list()[0].</p>
<p>// Open whatever port is the one you&#8217;re using.</p>
<p>myPort = new Serial(this, Serial.list()[0], 9600);</p>
<p>// don&#8217;t generate a serialEvent() unless you get a newline character:</p>
<p>myPort.bufferUntil(&#8216;\n&#8217;);</p>
<p>// set inital background:</p>
<p>background(0);</p>
<p>}</p>
<p>void draw () {</p>
<p>// everything happens in the serialEvent()</p>
<p>}</p>
<p>void serialEvent (Serial myPort) {</p>
<p>// get the ASCII string:</p>
<p>String inString = myPort.readStringUntil(&#8216;\n&#8217;);</p>
<p>if (inString != null) {</p>
<p>// trim off any whitespace:</p>
<p>inString = trim(inString);</p>
<p>// convert to an int and map to the screen height:</p>
<p>float inByte = float(inString);</p>
<p>inByte = map(inByte, 0, 1023, 0, height);</p>
<p>// draw the line:</p>
<p>stroke(127,34,255);</p>
<p>line(xPos, height, xPos, height &#8211; inByte);</p>
<p>// at the edge of the screen, go back to the beginning:</p>
<p>if (xPos &gt;= width) {</p>
<p>xPos = 0;</p>
<p>background(0);</p>
<p>}</p>
<p>else {</p>
<p>// increment the horizontal position:</p>
<p>xPos++;</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>*/</p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=2215</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interactive art with textile sensor</title>
		<link>http://newtextiles.media.mit.edu/?p=2125</link>
		<comments>http://newtextiles.media.mit.edu/?p=2125#comments</comments>
		<pubDate>Wed, 30 Mar 2011 03:54:39 +0000</pubDate>
		<dc:creator>greatjudy</dc:creator>
				<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=2125</guid>
		<description><![CDATA[For this project I made a crocet pressure sensor with wool yarns and conductive (for sensor) yarns. Since I had no experience of crochet, this is a very interesting experience of learning this traditional technique. I added 1 stitch and 2 stitches alternatively to each of the stitches of the previous circle in order to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://newtextiles.media.mit.edu/?attachment_id=2134" rel="attachment wp-att-2134"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9473.jpg" alt="" width="1134" height="850" class="aligncenter size-full wp-image-2134" /></a></p>
<p>For this project I made a crocet pressure sensor with wool yarns and conductive (for sensor) yarns. Since I had no experience of crochet, this is a very interesting experience of learning this traditional technique. I added 1 stitch and 2 stitches alternatively to each of the stitches of the previous circle in order to create a flat piece. Then I used boiling water to bathe it and washed it with soap repeatedly. After around 6 rounds, it looked felted.<br />
The result was good, though it seemed less sensitive to pressure after felting. I have to press it ver hardly.<br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2131" rel="attachment wp-att-2131"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9465.jpg" alt="" width="354" height="472" class="alignleft size-full wp-image-2131" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2132" rel="attachment wp-att-2132"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9469.jpg" alt="" width="661" height="496" class="alignright size-full wp-image-2132" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2133" rel="attachment wp-att-2133"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9470.jpg" alt="" width="661" height="496" class="alignleft size-full wp-image-2133" /></a></p>
<p><a href="http://newtextiles.media.mit.edu/?attachment_id=2135" rel="attachment wp-att-2135"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9475.jpg" alt="" width="661" height="496" class="aligncenter size-full wp-image-2135" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2136" rel="attachment wp-att-2136"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9478.jpg" alt="" width="496" height="661" class="aligncenter size-full wp-image-2136" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2130" rel="attachment wp-att-2130"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9479.jpg" alt="" width="661" height="496" class="aligncenter size-full wp-image-2130" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2170" rel="attachment wp-att-2170"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9485.jpg" alt="" width="496" height="661" class="aligncenter size-full wp-image-2170" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2169" rel="attachment wp-att-2169"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9488.jpg" alt="" width="496" height="661" class="aligncenter size-full wp-image-2169" /></a></p>
<p>I connected the textile sensor to the computer, using a very simple Arduino. I have no experience on programming language but I am always interested in the potential of processing for interaction and art. So I think this is a good opportunity for me to explore the processing, though it is very challenging for me. It is really hard and I spent long time on it, but it worth it to learn a new interesting thing.</p>
<p>The Bubble:<br />
I firstly wrote some circles changing their locations and size based on the input from the sensor. Once I pressed the sensor, the circles got higher and smaller.<br />
They looked like bubbles, which inspired me to write an interacrtion game responsive to people&#8217;s movements.<br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2152" rel="attachment wp-att-2152"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/captureframe-basic.jpg" alt="" width="800" height="600" class="aligncenter size-full wp-image-2152" /></a></p>
<p>Catch the fish!-interactive game:<br />
For the next step, I tried to create a game. A fish swims in the water, and you press the sensor to control the bubble to catch the fish. Once the bubble catch the fish, it changes color.<br />
The difficult part of this game is to delete the trace of the fish while leaving the trace of the bubbles. I have tried two ways:<br />
For the first method, I draw a blue square after the fish, which will delete the fish&#8217;s trace. It works smoothly. But there are still some traces above and under the fish (which look OK). And further, the blue square will delete some parts of the bubble as well.<br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2153" rel="attachment wp-att-2153"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/captureframe-fishA1.jpg" alt="" width="800" height="600" class="aligncenter size-full wp-image-2153" /></a></p>
<p><a href="http://newtextiles.media.mit.edu/?attachment_id=2154" rel="attachment wp-att-2154"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/captureframe-fishA2.jpg" alt="" width="800" height="600" class="aligncenter size-full wp-image-2154" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2159" rel="attachment wp-att-2159"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9491.jpg" alt="" width="661" height="496" class="aligncenter size-full wp-image-2159" /></a><a href="http://newtextiles.media.mit.edu/?attachment_id=2160" rel="attachment wp-att-2160"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_94921.jpg" alt="" width="661" height="496" class="aligncenter size-full wp-image-2160" /></a><a href="http://newtextiles.media.mit.edu/?attachment_id=2161" rel="attachment wp-att-2161"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_9493.jpg" alt="" width="661" height="496" class="aligncenter size-full wp-image-2161" /></a></p>
<p>For the second method, I firstly draw the fish and the bubble, and then refill the background every time after drawing. And then I re-draw the bubble. So the fish won&#8217;t leave any trace any more. I use Arraylist to remember the previous position of the bubbles. The problem of this program is the screen keeps flashing and it seems not very stable. I don&#8217;t know why.<br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2193" rel="attachment wp-att-2193"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/captureframe-fishB1.jpg" alt="" width="800" height="600" class="aligncenter size-full wp-image-2193" /></a></p>
<p>Ink and wash painting- interactive abstract painting-in memory of Wu Guanzhong:</p>
<p>The processing visualizations always remind me the abstract art. I want to do some interactive art between people&#8217;s movement and the abstract painting. I get the inspiration from Wu Guanzhong, who is a famous abstract ink and wash painter. I think the essence of in and wash painting is &#8220;the amount of water added in ink&#8221; and the &#8220;white space in between&#8221;. Currently I cannot write too complicated processing. I tried &#8220;ink dots&#8221; with different transparency that randomly dispersed on the white &#8220;paper&#8221;. I used Agent to draw the random dots. Once I squeeze the sensor, the dots get bigger.<br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2199" rel="attachment wp-att-2199"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_95051.jpg" alt="" width="661" height="496" class="aligncenter size-full wp-image-2199" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2200" rel="attachment wp-att-2200"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/IMG_95081.jpg" alt="" width="661" height="496" class="aligncenter size-full wp-image-2200" /></a><br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2198" rel="attachment wp-att-2198"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/captureframe-painting1.jpg" alt="" width="600" height="600" class="aligncenter size-full wp-image-2198" /></a></p>
<p>The process of drawing an abstract ink and wash painting:<br />
<a href="http://newtextiles.media.mit.edu/?attachment_id=2201" rel="attachment wp-att-2201"><img src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/painting-process.jpg" alt="" width="972" height="118" class="aligncenter size-full wp-image-2201" /></a></p>
<p>THE VIDEO LINKS for this project:<br />
<a href='http://www.youtube.com/user/greatjudit#p/u/2/xUiir6QTGTs'>The basic bubble</a><br />
<a href='http://www.youtube.com/user/greatjudit#p/u/1/wTXJsA9hRW0'>wTXJsA9hRW0</a><br />
<a href='http://www.youtube.com/user/greatjudit#p/u/0/J0chHqeTypc'>J0chHqeTypc</a></p>
<p>THE CODES OD PROCESSING:<br />
1. BubblefishA(blue square):<br />
import processing.serial.*;<br />
// serial is an input from other computer</p>
<p>Serial myPort;<br />
int xPos;<br />
int xPos2;<br />
PImage fishlazy;<br />
PImage fishshock;<br />
Boolean w = false;</p>
<p>void setup() {<br />
  size(800,600);<br />
  println (Serial.list());<br />
  myPort = new Serial(this, Serial.list()[2],9600);<br />
  myPort.bufferUntil(&#8216;\n&#8217;);<br />
  background(0,0,255);<br />
  xPos = 0;<br />
  xPos2 = 1;<br />
}</p>
<p>void serialEvent (Serial machine) {<br />
  String inString = myPort.readStringUntil(&#8216;\n&#8217;);<br />
  if ( inString != null) {<br />
    inString = trim(inString);<br />
    float inByte = float(inString);<br />
    println (inByte);<br />
    inByte = map(inByte,0,1023,0,height);<br />
    xPos = xPos + 1;<br />
    xPos++;<br />
    xPos2 = xPos2 + 1;<br />
    xPos2++;<br />
    // when xPos &gt;= width, renew<br />
    if (xPos2 &gt;= width) {<br />
      xPos = 0;<br />
      xPos2 = 1;<br />
      background(0,0,255);<br />
    }<br />
    if(inByte*0.9=300) {<br />
      fishlazy = loadImage(&#8220;fishlazy.gif&#8221;);<br />
      image(fishlazy,xPos2,300,100,80);<br />
      fill(0,0,255);<br />
      noStroke();<br />
      rect(xPos2,300,2,80);<br />
    }<br />
    strokeWeight(map(inByte,0,1023,1,5));<br />
    noFill();<br />
    stroke(255);<br />
    ellipse(xPos,inByte*0.9,map(inByte,1023,0,100,10),map(inByte,0,1023,10,100));<br />
    //point(xPos, map(inByte,1023,0,height/1.5,100));<br />
    //line(xPos,height, xPos, map(inByte,1023,0,height,0));<br />
  }<br />
}<br />
void draw() {<br />
}<br />
void keyPressed() {<br />
  if ( key == &#8216;s&#8217;) {<br />
    w = true;<br />
  }</p>
<p>  if ( key == &#8216;r&#8217;) {<br />
    w = false;<br />
  }</p>
<p>  if ( key == &#8216;c&#8217;) {<br />
    saveFrame (&#8220;captureframe-####.jpg&#8221;);<br />
  }<br />
}</p>
<p>2. BubblefishB(redraw the bubble):<br />
import processing.serial.*;<br />
// serial is an input from other computer</p>
<p>Serial myPort;<br />
int xPos;<br />
int yPos;<br />
int r;<br />
ArrayList bubblex;<br />
ArrayList bubbley;<br />
ArrayList bubbler;<br />
PImage fishlazy;<br />
PImage fishshock;<br />
int fishx;<br />
int fishy;<br />
int fishdelay;<br />
Boolean w = false;</p>
<p>void setup() {<br />
  size(800,600);<br />
  background(0,0,255);<br />
  xPos = 0;<br />
  fishlazy = loadImage(&#8220;fishlazy.gif&#8221;);<br />
  fishshock = loadImage(&#8220;fishshock.gif&#8221;);<br />
  fishx = 0;<br />
  fishy = height/2;<br />
  fishdelay = 10;</p>
<p>  println (Serial.list());<br />
  myPort = new Serial(this, Serial.list()[2],9600);<br />
  myPort.bufferUntil(&#8216;\n&#8217;);<br />
}<br />
//void draw() {<br />
void serialEvent (Serial machine) {<br />
  String inString = myPort.readStringUntil(&#8216;\n&#8217;);<br />
  if ( inString != null) {<br />
    inString = trim(inString);<br />
    float inByte = float(inString);<br />
    println (inByte);<br />
    //  float inByte = random(0,1023);<br />
    inByte = int(map(inByte,0,1023,0,height));</p>
<p>    if ((xPos &gt; width)||(xPos == 0)) {<br />
      bubblex = new ArrayList();<br />
      bubbley = new ArrayList();<br />
      bubbler = new ArrayList();<br />
      xPos = 0;<br />
    }<br />
    background(0,0,255);<br />
    smooth();<br />
    frameRate(15);<br />
    //bubble<br />
    yPos =  int(inByte*0.9);<br />
    r = int(map(inByte,1023,0,100,10));<br />
    bubblex.add(xPos);<br />
    bubbley.add(yPos);<br />
    bubbler.add(r);      </p>
<p>    for (int i = 0; i &lt; bubblex.size(); i++) {<br />
      stroke(255);<br />
      //strokeWeight(map(inByte,0,1023,1,5));<br />
      noFill();<br />
      int tempx =(Integer)bubblex.get(i);<br />
      int tempy =(Integer)bubbley.get(i);<br />
      int tempr =(Integer)bubbler.get(i);<br />
      ellipse(tempx,tempy,tempr,tempr);<br />
    }</p>
<p>    //fish<br />
    if (fishdelay == 10) {<br />
      image(fishlazy, fishx, fishy,100,80);<br />
    }<br />
    if (fishdelay &lt; 10) {<br />
      image(fishshock,fishx, fishy,100,80);<br />
      fishdelay&#8211;;<br />
    }<br />
    if ((abs(xPos &#8211; fishx)&lt;10) &amp;&amp; (abs(yPos &#8211; fishy)&lt; 10)) {<br />
      fishdelay&#8211;;<br />
    }<br />
    if (fishdelay == 0) {<br />
      fishdelay = 10;<br />
      fishx = 0;<br />
    }<br />
    if (fishx == width) {<br />
      fishx = 0;<br />
    }<br />
    xPos = xPos + 1;<br />
    fishx++;<br />
  }<br />
}</p>
<p>void draw() {<br />
}<br />
void keyPressed() {<br />
  if ( key == &#039;s&#039;) {<br />
    w = true;<br />
  }</p>
<p>  if ( key == &#039;r&#039;) {<br />
    w = false;<br />
  }</p>
<p>  if ( key == &#039;c&#039;) {<br />
    saveFrame (&quot;captureframe-####.jpg&quot;);<br />
  }<br />
}</p>
<p>3. The ink and wash painting:<br />
import toxi.geom.*;<br />
import processing.serial.*;<br />
// here i import two libraries and declare machine// arraylist is like a package which consist of several items. its name is agents<br />
// boolean is like a switch, i use it to stop and restart the script<br />
Serial machine;<br />
//Arraylist is like int. A An ArrayList stores a variable number of objects. This is similar to making an array of objects, but with an ArrayList, items can be easily added and removed from the ArrayList and it is resized dynamically.<br />
ArrayList agents;<br />
//Boolean judges two values (like a switch), true or false. here &quot;true&quot; is &quot;turning off&quot;.<br />
Boolean w = false;</p>
<p>void setup() {<br />
  size(600,600);<br />
  background(255,255,255);<br />
  // population means the number of generators, here i put 100 generators randomly (x ,y) in the windows<br />
  // x y is the location, it is random, sw is its opacity( black to white)<br />
  // agent. add means i put the item ( x,y,sw) into a bag called agents<br />
  // new Agent(x,y,sw) means the name of the item i call it Agent<br />
  // agents is the bag, each item inside called Agent, inside Agent there are x,y,sw  int population = 100;<br />
  int population = 100;<br />
  //Arraylist name = new Arraylist. &quot;new&quot; means start/establish<br />
  agents = new ArrayList();<br />
  //for(condition){result} is a kind of circulation. (&#8230;)circulation. i only be used to run the program 100 times.<br />
  for (int i = 0; i &lt; population; i++) {<br />
    int x = int( random(0, width));<br />
    int y = int(random(0, height));<br />
    int sw = int ( random(1,255));<br />
    agents.add(new Agent(x,y,sw));<br />
  }<br />
  machine = new Serial(this, Serial.list()[2],9600);<br />
  machine.bufferUntil(&#039;\n&#039;);</p>
<p>}</p>
<p>void draw() {<br />
}</p>
<p>void serialEvent (Serial machine) {<br />
  String inString = machine.readStringUntil(&#039;\n&#039;);<br />
  if(inString != null) {<br />
    inString = trim(inString);<br />
    float inByte = float(inString);<br />
    println(inByte);<br />
 // here i try to draw now<br />
 //w is the switch, when it is false, we draw<br />
 // i recall the items in the bag and ask each of them to perform several actions<br />
 // 10 is the number which u can change.<br />
 //w controls &quot;pause&quot; of draw<br />
    if (w == false) {<br />
      //Arraylist.size() can read how many agents are there in the arraylist.<br />
      //Agent describes the properties of a<br />
      //Arraylist.get(i) means taking the sample No.i from the population<br />
      //name the selected sample as a<br />
      for ( int i = 0; i &lt; agents.size(); i++) {<br />
        Agent a = (Agent) agents.get(i);<br />
        a.move(inByte);<br />
        a.drawdot();<br />
        if (inByte &lt;= 900) {<br />
          a.drawcircle(inByte);<br />
        }<br />
      }<br />
    }<br />
  }<br />
}</p>
<p>// here is about the item(Agent) inside the bag agents.<br />
//class<br />
class Agent {<br />
//declare for the items inside<br />
  int xPos;<br />
  int yPos;<br />
  int sw;<br />
//constructor. Agent(3 properties). Arraylist (named agents) contains 100 Agents.<br />
//blabla=_blabla<br />
  Agent(int _xPos, int _yPos, int _sw) {<br />
    xPos = _xPos;<br />
    yPos = _yPos;<br />
    sw = _sw;<br />
  }<br />
//behavior, action of each Agent//now it will move. acc is the coefficient linked to inByte scaled to -10 to 10//Vec3D is the distance, at last i add the distance to the position of the Agent<br />
  void move(float inByte) {<br />
    int acc = int(map(inByte,0,1023,-10,10));<br />
    //the Agent moves around the original position.<br />
    Vec3D vel = new Vec3D(random(-1,1)*acc,random(-1,1)*acc,0);<br />
    yPos = yPos + int(vel.y);<br />
    xPos = xPos + int(vel.x);<br />
  }<br />
  //draw the new position. stroke color is sw, u can change the number<br />
  void drawdot() {<br />
    stroke(sw);<br />
    strokeWeight(2);<br />
    point (xPos,yPos);<br />
  }<br />
// draw the circle. change the color and the size as u want!<br />
  void drawcircle(float inByte) {<br />
    float r = map(inByte,0,1023,10,30);<br />
    fill (0, int(random(20,200)),0,10);<br />
    noStroke();<br />
    ellipse(xPos, yPos, r,r);<br />
  }<br />
}<br />
// here is the interface, s is stop, r is restart, c is capture frame<br />
void keyPressed() {<br />
  if ( key == &#039;s&#039;) {<br />
    w = true;<br />
  }</p>
<p>  if ( key == &#039;r&#039;) {<br />
    w = false;<br />
  }</p>
<p>  if ( key == &#039;c&#039;) {<br />
    saveFrame (&quot;captureframe-####.jpg&quot;);<br />
  }<br />
}</p>
<p>Thanks Leah and Ringo a lot for your help!</p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=2125</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Albert&#8217;s Hot Pink Hand Textile Sensor</title>
		<link>http://newtextiles.media.mit.edu/?p=2063</link>
		<comments>http://newtextiles.media.mit.edu/?p=2063#comments</comments>
		<pubDate>Tue, 29 Mar 2011 03:46:17 +0000</pubDate>
		<dc:creator>mrching</dc:creator>
				<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=2063</guid>
		<description><![CDATA[Hot pink has never really been in my colour wheel until this week&#8217;s textile sensor assignment.  It took me some time to understand how the sensor itself worked and which materials and in what quantity gave the most appropriate readings for the Processing graph.  What resulted was a fun little hot pink sensored hand which [...]]]></description>
			<content:encoded><![CDATA[<p>Hot pink has never really been in my colour wheel until this week&#8217;s textile sensor assignment.  It took me some time to understand how the sensor itself worked and which materials and in what quantity gave the most appropriate readings for the Processing graph.  What resulted was a fun little hot pink sensored hand which I could &#8220;play&#8221; in sync to my favorite songs.</p>
<p><a href="http://www.youtube.com/watch?v=lQcKAHE2IkA">Hot Pink Hand Textile Sensor played to &#8220;Raise Your Glass&#8221; by the Glee Cast</a></p>
<div class="wp-caption alignnone" style="width: 730px"><img title="Hot Pink Hand Textile Sensor" src="https://lh6.googleusercontent.com/_Y9p6N00ThMQ/TZFN5E4AceI/AAAAAAABH6w/DcwwUq-L0Jw/s720/IMG_9764.JPG" alt="" width="720" height="480" /><p class="wp-caption-text">Hot Pink Hand Textile Sensor - Watch the Video Above</p></div>
<p><span id="more-2063"></span></p>
<p>To understand how the textiles work and interface with Arduino and Processing, I started by constructing the simple sticktape sensor that Hannah describes on her amazing website, &#8220;<a href="http://www.kobakant.at/DIY/?p=429">How to Get What You Want</a>.&#8221;</p>
<div class="wp-caption alignnone" style="width: 730px"><img title="Sticky Tape Sensor" src="https://lh4.googleusercontent.com/_Y9p6N00ThMQ/TZFN4vVotgI/AAAAAAABH6g/nGplQ199TQE/s720/IMG_9774.JPG" alt="" width="720" height="480" /><p class="wp-caption-text">Sticky Tape Sensor</p></div>
<p>See sticky tape <a href="http://www.youtube.com/watch?v=jmSICjJE1lA">demo video</a></p>
<p>From that initial prototype, I wanted to construct a more elaborate sensor that could intersect with something very tactile and natural to humans.  Hands came first to mind so I decided to start with my own hand as a frame for my project.</p>
<div class="wp-caption alignnone" style="width: 394px"><img title="Cutting Out My Hand" src="https://lh4.googleusercontent.com/_Y9p6N00ThMQ/TZFQs6vrJVI/AAAAAAABH7I/hkbJX-ECfPY/s512/IMG_20110328_152557.jpg" alt="" width="384" height="512" /><p class="wp-caption-text">Cutting Out My Hand - It was like Thanksgiving!</p></div>
<p>I then sewed some conductive thread onto the leather hand to provide the underpinnings for the sensor.</p>
<p><img class="alignnone" title="Sewn Hand" src="https://lh6.googleusercontent.com/_Y9p6N00ThMQ/TZFN48u1wKI/AAAAAAABH6o/bJrxqPpyH70/s720/IMG_9743.JPG" alt="" width="720" height="480" /></p>
<p>I then tested multiple materials like the Velostat in different thicknesses with the Arduino and Processing software to understand which combinations of materials would be the most appropriately sensitive for hand touch.   I eventually defaulted to two layers of Velostat for the thumb and a layer of black rubbery material (not sure which one) for the palm.  It was then I realized that the hand needed some pizzaz so I cut some hot pink neoprene touchpoints that I could place on the hand itself which would be perfect for fingers.</p>
<p>As I tapped away and saw how tapping on the sensor felt like playing a piano, I decided to tap in sync to some music.</p>
<p>All in all, a very fun and rewarding project!</p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=2063</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nicole&#8217;s Experiments with Textile Sensors</title>
		<link>http://newtextiles.media.mit.edu/?p=1982</link>
		<comments>http://newtextiles.media.mit.edu/?p=1982#comments</comments>
		<pubDate>Tue, 29 Mar 2011 03:25:22 +0000</pubDate>
		<dc:creator>N.Tari</dc:creator>
				<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1982</guid>
		<description><![CDATA[Process: I created several stretch and pressure sensors for this project. Each was constructed differently from different materials and as a result have a range of sensitivities and uses. I started by using the  conductive yarn I spun by hand and crocheting it into a strip. The yarn is resistant because of its mixture of [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-2028" href="http://newtextiles.media.mit.edu/?attachment_id=2028"><img class="aligncenter size-full wp-image-2028" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/FinalImae_small.jpg" alt="" width="622" height="465" /></a><br />
<span id="more-1982"></span></p>
<p><strong>Process</strong>: I created several stretch and pressure sensors for this project. Each was constructed differently from different materials and as a result have a range of sensitivities and uses. I started by using the  conductive yarn I spun by hand and crocheting it into a strip. The yarn is resistant because of its mixture of aluminum and wool fibers.  The next sensor I created in a similar fashion by crocheting a cotton yarn with a conductive yarn with a higher resistance.  For both of these sensors, changes in resistance are created and measured by stretching the structure bring the resistance down.  After completing the two stretch sensors I started to experiment with needle felting. I started by creating a felt that in the center was a combination of aluminum fibers and wool.  This functions similarly to the stretch sensor made from the hand spun yarn. As the sensor is pressed the resistance drops. Pressure sensor two is constructed out of conductive yarn and traditional yarn to create a higher resistance. This is similar the the sensors Heidi and I built for our cell phone pouches.  The yarn was crocheted together in a circle. The last sensor I fabricated, inspired by Hannah&#8217;s bend sensors,  is the most complex.  Here I used two pieced of felt (one created by hand), conductive thread, very small pieces of conductive thread, and velostat to create the sensor.  Here conductive thread is sewn into each half of the sensor attaching to a small piece of conductive fabric where the arduino can be attached.  The the two pieces are places with the stitched facing each other crisscrossed with a piece of volostat in the center. When the sensor is pressed the velostat compresses and the resistance drops.</p>
<p><strong>Programming: </strong>Initially I wanted to create a system that would allow me to compare the data for each sensor. I experimented with visual outputs and settled on a few. The first shows how the data is changing though a square that scales in size and changes position in reaction to the sensors behavior. After I completed this I wanted to be able to save the visual out put created with processing and use it to compare the behaviors. To enable this I created a graph that exports a PDF when the file is closed. When testing the sensors  I tried to keep the timing of the pressure of stretching consistent. When looking at the graphs created the ranges for the sensors can be seen.</p>
<p><strong>PROCESSING:</strong></p>
<p><strong>Visual Output:</strong></p>
<p><strong><span style="font-weight: normal"><strong> </strong></span></strong></p>
<p><strong><strong><span style="font-weight: normal"><span style="font-size: x-small">import processing.serial.*;</span></span></p>
<p></strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small">import fullscreen.*; </span></span></p>
<p><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small">SoftFullScreen fs;</span></span></p>
<p></strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> </span></span><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><strong><strong><strong> </strong></strong></strong></span></p>
<p><strong><strong><strong> </strong></strong></strong></p>
<p><strong><strong><strong><span style="font-weight: normal"><span style="font-size: x-small">Serial myPort;        // The serial port</span></span></p>
<p></strong></strong></strong></strong><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small">int xPos = 1;         // horizontal position of the graph</span></span></p>
<p><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small">void setup () { </span></span></p>
<p></strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> //size(1024, 768);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> size(screen.width, screen.height);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> noCursor();</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> //fullscreen</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> fs = new SoftFullScreen(this); </span></span></p>
<p><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small"> //List all the available serial ports</span></span></p>
<p></strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> println(Serial.list());</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> // I know that the first port in the serial list on my mac</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> // is always my  Arduino, so I open Serial.list()[0].</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> // Open whatever port is the one you&#8217;re using.</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> myPort = new Serial(this, Serial.list()[0], 9600);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> // don&#8217;t generate a serialEvent() unless you get a newline character:</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> myPort.bufferUntil(&#8216;\n&#8217;);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> // set inital background:</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> background(0);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> </span></span><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small">}</span></span></p>
<p></strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small">void draw () {</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> // everything happens in the serialEvent()</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small">}</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> </span></span><span style="font-weight: normal;font-size: x-small">void serialEvent (Serial myPort) {</span></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small"><br />
</span></span></p>
<p></strong><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong> </strong></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small"><span> </span>// get the ASCII string:</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"><br />
</span></span></p>
<p></strong></strong><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small"><span> </span>String inString = myPort.readStringUntil(&#8216;\n&#8217;);</span></span></p>
<p></strong></p>
<p><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small"> if (inString != null) {</span></span></p>
<p></strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> // trim off any whitespace:</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> inString = trim(inString);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> // convert to an int and map to the screen height:</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> float inByte = float(inString); </span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> inByte = map(inByte, 0, 1024, 0, height);</span></span></p>
<p><span style="font-weight: normal"><strong> </strong></span></p>
<p><strong><span style="font-weight: normal"><span style="font-size: x-small"> // draw the rect:</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"><br />
</span></span></p>
<p></strong><span style="font-weight: normal"><strong><strong><strong> </strong></strong></strong></span></p>
<p><strong><strong><strong><span style="font-weight: normal"><span style="font-size: x-small"> smooth();</span></span></p>
<p></strong></strong></strong><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> background(255); </span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> noStroke();</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> rect((inByte/2)+200, 300, inByte/2, inByte/2);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> fill(#3EC0E3);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> smooth();</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> println(inByte);</span></span></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> </span></span><span style="font-weight: normal"><strong><strong> </strong></strong></span></p>
<p><strong><strong><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></p>
<p></strong></strong><strong> </strong></p>
<p><strong> </strong></p>
<p><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></p>
<p></strong></p>
<p><strong>Graph with PDF Export:</strong></p>
<p><strong> </strong></p>
<p><strong></p>
<div><span style="font-weight: normal"><strong></p>
<div><span style="font-weight: normal"><span style="font-size: x-small">import processing.serial.*;</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">import fullscreen.*; </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">import processing.pdf.*;</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">boolean saveOneFrame = false;</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">SoftFullScreen fs;</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"><br />
</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">Serial myPort;        // The serial port</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">int xPos = 1;         // horizontal position of the graph</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">void setup () {</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> size(screen.width, screen.height);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> noCursor();</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"><br />
</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> fs = new SoftFullScreen(this); //This helps with full screen</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> beginRecord(PDF, &#8220;Graph-####.pdf&#8221;); //For PDF </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // List all the available serial ports</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> println(Serial.list());</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // I know that the first port in the serial list on my mac</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // is always my  Arduino, so I open Serial.list()[0].</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // Open whatever port is the one you&#8217;re using.</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> myPort = new Serial(this, Serial.list()[0], 9600);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // don&#8217;t generate a serialEvent() unless you get a newline character:</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> myPort.bufferUntil(&#8216;\n&#8217;);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // set inital background:</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> background(255);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">void draw () {</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // everything happens in the serialEvent()</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">void serialEvent (Serial myPort) {</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // get the ASCII string:</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> String inString = myPort.readStringUntil(&#8216;\n&#8217;);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> if (inString != null) {</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // trim off any whitespace:</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> inString = trim(inString);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // convert to an int and map to the screen height:</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> float inByte = float(inString); </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> inByte = map(inByte, 0, 1024, 200, height);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // draw the line:</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> //stroke(#16F0A9);//Strech Sensor 1</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> //stroke(#0A9CF5);//Strech Sensor 2</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // stroke(#F0ED94);//Presure Sensor 1</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> //stroke(#F05416);//Presure Sensor 2</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> stroke(#94F0EF);//Presure Sensor 2</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> line(xPos/2, height, xPos/2, height &#8211; inByte);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> stroke(#403E3E); </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> line(0,590,3000,590); //base line</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> smooth();</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> println(inByte);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // at the edge of the screen, go back to the beginning:</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> if (xPos &gt;= 3000) {</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> xPos = 0;</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> //background(255); </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> else {</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> // increment the horizontal position:</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> xPos++;</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> if(saveOneFrame == true) {</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> endRecord();</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> saveOneFrame = false; </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> }</span></span></div>
<div><span style="font-weight: normal"><strong></p>
<div><span style="font-weight: normal"><span style="font-size: x-small">void mousePressed() {</span></span></div>
<p></strong></p>
<p></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> saveOneFrame = true; </span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">}</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">void stop() {</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> delay(1000);</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small"> endRecord();</span></span></div>
<div><span style="font-weight: normal"><span style="font-size: x-small">}</span></span></div>
<div><span><span style="font-size: small">Documentation: </span></span></div>
<p></strong></p>
<p></span></div>
<p></strong></p>

<a href='http://newtextiles.media.mit.edu/?attachment_id=2257' title='GraphsWithImages'><img width="150" height="115" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/GraphsWithImages.jpg" class="attachment-thumbnail" alt="GraphsWithImages" title="GraphsWithImages" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2057' title='StrechSensorComparison-2'><img width="150" height="115" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/StrechSensorComparison-2.jpg" class="attachment-thumbnail" alt="StrechSensorComparison-2" title="StrechSensorComparison-2" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2056' title='StrechSensorComparison-1'><img width="150" height="111" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/StrechSensorComparison-1.jpg" class="attachment-thumbnail" alt="StrechSensorComparison-1" title="StrechSensorComparison-1" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2022' title='ScreenShot'><img width="150" height="93" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/ScreenShot.png" class="attachment-thumbnail" alt="ScreenShot" title="ScreenShot" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2021' title='PressureSensor2_5_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/PressureSensor2_5_small.jpg" class="attachment-thumbnail" alt="PressureSensor2_5_small" title="PressureSensor2_5_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2020' title='PresureSensor2_4_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/PresureSensor2_4_small.jpg" class="attachment-thumbnail" alt="PresureSensor2_4_small" title="PresureSensor2_4_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2019' title='FeltingPresureSensor2_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/FeltingPresureSensor2_small.jpg" class="attachment-thumbnail" alt="FeltingPresureSensor2_small" title="FeltingPresureSensor2_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2018' title='FeltingPresureSensor2_4 _small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/FeltingPresureSensor2_4-_small.jpg" class="attachment-thumbnail" alt="FeltingPresureSensor2_4 _small" title="FeltingPresureSensor2_4 _small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2017' title='photo-2_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/photo-2_small.jpg" class="attachment-thumbnail" alt="photo-2_small" title="photo-2_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2016' title='YarnForStrechSensor2_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/YarnForStrechSensor2_small.jpg" class="attachment-thumbnail" alt="YarnForStrechSensor2_small" title="YarnForStrechSensor2_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2015' title='PresureSensor1_3_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/PresureSensor1_3_small.jpg" class="attachment-thumbnail" alt="PresureSensor1_3_small" title="PresureSensor1_3_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2025' title='Sensor1_1_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Sensor1_1_small.jpg" class="attachment-thumbnail" alt="Sensor1_1_small" title="Sensor1_1_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2014' title='FeltingPresureSensor2_2_small'><img width="111" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/FeltingPresureSensor2_2_small.jpg" class="attachment-thumbnail" alt="FeltingPresureSensor2_2_small" title="FeltingPresureSensor2_2_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2013' title='FeltingPresureSensor1_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/FeltingPresureSensor1_small.jpg" class="attachment-thumbnail" alt="FeltingPresureSensor1_small" title="FeltingPresureSensor1_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2012' title='FeltingPresureSensor1_3_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/FeltingPresureSensor1_3_small.jpg" class="attachment-thumbnail" alt="FeltingPresureSensor1_3_small" title="FeltingPresureSensor1_3_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2011' title='Processing1_Small'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Processing1_Small.jpg" class="attachment-thumbnail" alt="Processing1_Small" title="Processing1_Small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2010' title='StrechSensor2_4_small'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/StrechSensor2_4_small.jpg" class="attachment-thumbnail" alt="StrechSensor2_4_small" title="StrechSensor2_4_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2009' title='crochet_1_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/crochet_1_small.jpg" class="attachment-thumbnail" alt="crochet_1_small" title="crochet_1_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2008' title='StrechSensor1_6_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/StrechSensor1_6_small.jpg" class="attachment-thumbnail" alt="StrechSensor1_6_small" title="StrechSensor1_6_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2007' title='StrechSensor1_1_small'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/StrechSensor1_1_small.jpg" class="attachment-thumbnail" alt="StrechSensor1_1_small" title="StrechSensor1_1_small" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2004' title='20110228_131228797'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/20110228_131228797.png" class="attachment-thumbnail" alt="20110228_131228797" title="20110228_131228797" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2045' title='Final'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/Final.jpg" class="attachment-thumbnail" alt="Final" title="Final" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2028' title='FinalImae_small'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/FinalImae_small.jpg" class="attachment-thumbnail" alt="FinalImae_small" title="FinalImae_small" /></a>

]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1982</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruffles the fidgety penguin and Tom the melty snowman</title>
		<link>http://newtextiles.media.mit.edu/?p=1983</link>
		<comments>http://newtextiles.media.mit.edu/?p=1983#comments</comments>
		<pubDate>Tue, 29 Mar 2011 01:40:07 +0000</pubDate>
		<dc:creator>heidiqc</dc:creator>
				<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1983</guid>
		<description><![CDATA[Once upon a time, Ruffles the fidgety penguin decided that he was tired of being static, unmoving little plushie. &#8220;I want to be REAL!&#8221; He cried, wiggling his little soft head, and wishing upon a star. Of course, the said star was feeling quite benevolent that day, and promptly granted (the first part) of his [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-2001" title="Tom and Ruffles" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2968.jpg" alt="" width="800" height="600" /></p>
<p style="text-align: left;">
<p><span id="more-1983"></span></p>
<p style="text-align: left;">
<p style="text-align: left;">Once upon a time, Ruffles the fidgety penguin decided that he was tired of being static, unmoving little plushie. &#8220;I want to be REAL!&#8221; He cried, wiggling his little soft head, and wishing upon a star. Of course, the said star was feeling quite benevolent that day, and promptly granted (the first part) of his wish, giving him the magical ability to rotate his head to see the world around him.</p>
<p><center><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/6p_xvfBHcso?hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/6p_xvfBHcso?hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></center></p>
<p style="text-align: left;">However, Ruffles was quite an antsy fella (hence his name), and unfortunately had a nervous twitch, which could not be cured.  The star was rather unsatisfied with this particular outcome, and decided to pick a less jumpy toy as his next subject. Tom the melty snowman was the toy of choice, as his outlook on life had recently been negatively affected by the recent Boston sun. His bored, resigned nature made him the perfect candidate. His unhurried gaze pleased the star, who proclaimed Iteration 2 a success!</p>
<p><center><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/NWCrBeYuXhU?hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/NWCrBeYuXhU?hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></center></p>
<p style="text-align: left;">The end.</p>
<p style="text-align: left;">
<p style="text-align: left;"><strong>Behind-The-Scenes- The making of Ruffles and Tom:</strong></p>

<a href='http://newtextiles.media.mit.edu/?attachment_id=1984' title='Needle felting the base'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2895.jpg" class="attachment-thumbnail" alt="Needle felting the base" title="Needle felting the base" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1985' title='Needle felting the base into a circle '><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2896.jpg" class="attachment-thumbnail" alt="Needle felting the base into a circle" title="Needle felting the base into a circle" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1986' title='Needle felting the second circle'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2897.jpg" class="attachment-thumbnail" alt="Needle felting the second circle" title="Needle felting the second circle" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1987' title='Felting the conductive fiber'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2899.jpg" class="attachment-thumbnail" alt="Felting the conductive fiber" title="Felting the conductive fiber" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1988' title='Bottom half with jewelry clasp'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2902.jpg" class="attachment-thumbnail" alt="Bottom half with jewelry clasp" title="Bottom half with jewelry clasp" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1989' title='Using epoxy to secure the top clasp'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2904.jpg" class="attachment-thumbnail" alt="Using epoxy to secure the top clasp" title="Using epoxy to secure the top clasp" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1990' title='Adhering the conductive fabric onto felt'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2905.jpg" class="attachment-thumbnail" alt="Adhering the conductive fabric onto felt" title="Adhering the conductive fabric onto felt" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1991' title='Completed top half of sensor with magnet'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2910.jpg" class="attachment-thumbnail" alt="Completed top half of sensor with magnet" title="Completed top half of sensor with magnet" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1992' title='Connecting the conductive fabric to bottom clasp with conductive thread'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2911.jpg" class="attachment-thumbnail" alt="Connecting the conductive fabric to bottom clasp with conductive thread" title="Connecting the conductive fabric to bottom clasp with conductive thread" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1993' title='Felting the penguin head onto top half of sensor'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2912.jpg" class="attachment-thumbnail" alt="Felting the penguin head onto top half of sensor" title="Felting the penguin head onto top half of sensor" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1994' title='Testing the penguin analog sensor'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2955.jpg" class="attachment-thumbnail" alt="Testing the penguin analog sensor" title="Testing the penguin analog sensor" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1995' title='Felting the penguin face'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2957.jpg" class="attachment-thumbnail" alt="Felting the penguin face" title="Felting the penguin face" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1996' title='Sewing magnets onto bottom half of snowman sensor'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2958.jpg" class="attachment-thumbnail" alt="Sewing magnets onto bottom half of snowman sensor" title="Sewing magnets onto bottom half of snowman sensor" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1997' title='Felting head and top half of snowman sensor'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2959.jpg" class="attachment-thumbnail" alt="Felting head and top half of snowman sensor" title="Felting head and top half of snowman sensor" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1998' title='Tom'><img width="112" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2960.jpg" class="attachment-thumbnail" alt="Tom" title="Tom" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1999' title='Testing Tom the snowman'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2961.jpg" class="attachment-thumbnail" alt="Testing Tom the snowman" title="Testing Tom the snowman" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2000' title='Digital sensor inside Tom'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2966.jpg" class="attachment-thumbnail" alt="Digital sensor inside Tom" title="Digital sensor inside Tom" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=2001' title='Tom and Ruffles'><img width="150" height="112" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/DSCF2968.jpg" class="attachment-thumbnail" alt="Tom and Ruffles" title="Tom and Ruffles" /></a>

<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;"><strong>Ruffles the Fidgety Penguin:</strong></p>
<p style="text-align: left;">Analog rotation sensor with two channels, Left and Right. Each channel is essentially a potentiometer, created by needle felting aluminum and steel fibers into wool so that the resistance increases when the angle of rotation is increased.  The analog pins A0 and A1 are connected to the potentiometers at the point where the penguin head points forward. The center clasp serves as a switch, as the top clasp is connected to a magnet, which remains in contact with the resistive surface. The bottom clasp is connected to the (-) terminal on the Arduino via a length of conductive fabric. The unstable nature of the signal received from the felted potentiometer can be attributed to the uneven density of the conductive fibers. The mass of conductive and non-conductive fibers also changes resistance with pressure, which causes even more fluctuation. This results in a jumpy image on the screen even after smoothing out the serial output in Arduino over 30 readings.</p>
<p style="text-align: left;">Resistance of potentiometer when penguin is facing forward- 13.2 ohms, turning away by 90 degrees &#8211; 4.83 Mohms, almost facing behind &#8211; 15.6Mohms</p>
<p style="text-align: left;">
<p style="text-align: left;"><strong>Tom the Melty Snowman:</strong></p>
<p style="text-align: left;">Digital rotation sensor with 5 outputs- 2 left, 1 center, and 2 right. Works similarly to the analog sensor, except that the bottom half of rotation sensor has 5 magnets for the 5 outputs embedded below the felt layer and top half has 1 magnet. The jewelry clasp from the analog sensor was changed to the larger snap clasp for easier handling. The processing code was changed to scroll the image by 1 until the desired point of view was reached.</p>
<p style="text-align: left;">
<p style="text-align: left;"><strong>Inside Ruffles (Analog Rotation Sensor):</strong></p>
<p style="text-align: left;"><span style="text-decoration: underline;">Arduino:</span></p>
<p style="text-align: left;">
<div id="_mcePaste"><em>// set number of readings to smooth over</em></div>
<div id="_mcePaste"><em>const int numReadings = 10;</em></div>
<div id="_mcePaste"><em>// set variables for A0</em></div>
<div id="_mcePaste"><em>int readings[numReadings];      // the readings from the analog input</em></div>
<div id="_mcePaste"><em>int index = 0;                  // the index of the current reading</em></div>
<div id="_mcePaste"><em>int total = 0;                  // the running total</em></div>
<div id="_mcePaste"><em>int average = 0;                // the average</em></div>
<div id="_mcePaste"><em>int inputPin = A0;</em></div>
<div id="_mcePaste"><em>// set variables for A1</em></div>
<div id="_mcePaste"><em>int readings2[numReadings];      // the readings from the analog input</em></div>
<div id="_mcePaste"><em>int index2 = 0;                  // the index of the current reading</em></div>
<div id="_mcePaste"><em>int total2 = 0;                  // the running total</em></div>
<div id="_mcePaste"><em>int average2 = 0;                // the average</em></div>
<div id="_mcePaste"><em>int inputPin2 = A1;</em></div>
<div><em>void setup() {</em></div>
<div id="_mcePaste"><em>// initialize the serial communication:</em></div>
<div id="_mcePaste"><em>Serial.begin(9600);</em></div>
<div id="_mcePaste"><em>// set pins to high</em></div>
<div id="_mcePaste"><em>digitalWrite(A0, HIGH);</em></div>
<div id="_mcePaste"><em>digitalWrite(A1, HIGH);</em></div>
<div id="_mcePaste"><em>// initialize all the readings to 0</em></div>
<div id="_mcePaste"><em>for (int thisReading = 0; thisReading &lt; numReadings; thisReading++)</em></div>
<div id="_mcePaste"><em>readings[thisReading] = 0;</em></div>
<div id="_mcePaste"><em>}</em></div>
<div><em>// a0 is left, a1 is right</em></div>
<div id="_mcePaste"><em>//1023 is not sensing, 15 is sensing</em></div>
<div id="_mcePaste"><em>void loop() {</em></div>
<div id="_mcePaste"><em>// when a0 is on left, send signal to monitor</em></div>
<div id="_mcePaste"><em>if (analogRead(A0)&lt;900) {</em></div>
<div id="_mcePaste"><em>// subtract the last reading:</em></div>
<div id="_mcePaste"><em>total= total &#8211; readings[index];</em></div>
<div id="_mcePaste"><em>// read from the sensor:</em></div>
<div id="_mcePaste"><em>readings[index] = analogRead(inputPin);</em></div>
<div id="_mcePaste"><em>// add the reading to the total:</em></div>
<div id="_mcePaste"><em>total= total + readings[index];</em></div>
<div id="_mcePaste"><em>// advance to the next position in the array:</em></div>
<div id="_mcePaste"><em>index = index + 1;</em></div>
<div id="_mcePaste"><em>// if we&#8217;re at the end of the array&#8230;</em></div>
<div id="_mcePaste"><em>if (index &gt;= numReadings)</em></div>
<div id="_mcePaste"><em>// &#8230;wrap around to the beginning:</em></div>
<div id="_mcePaste"><em>index = 0;</em></div>
<div id="_mcePaste"><em>// calculate the average:</em></div>
<div id="_mcePaste"><em>average = total / numReadings;</em></div>
<div id="_mcePaste"><em>// send it to the computer</em></div>
<div id="_mcePaste"><em>Serial.println(3000+average);</em></div>
<div id="_mcePaste"><em>}</em></div>
<div id="_mcePaste"><em>// when a1 is on right, send signal to monitor</em></div>
<div id="_mcePaste"><em>if (analogRead(A1)&lt;900) {</em></div>
<div id="_mcePaste"><em>// subtract the last reading:</em></div>
<div id="_mcePaste"><em>total2= total2 &#8211; readings2[index2];</em></div>
<div id="_mcePaste"><em>// read from the sensor:</em></div>
<div id="_mcePaste"><em>readings2[index2] = analogRead(inputPin2);</em></div>
<div id="_mcePaste"><em>// add the reading to the total:</em></div>
<div id="_mcePaste"><em>total2= total2 + readings2[index2];</em></div>
<div id="_mcePaste"><em>// advance to the next position in the array:</em></div>
<div id="_mcePaste"><em>index2 = index2 + 1;</em></div>
<div id="_mcePaste"><em>// if we&#8217;re at the end of the array&#8230;</em></div>
<div id="_mcePaste"><em>if (index2 &gt;= numReadings)</em></div>
<div id="_mcePaste"><em>// &#8230;wrap around to the beginning:</em></div>
<div id="_mcePaste"><em>index2 = 0;</em></div>
<div id="_mcePaste"><em>// calculate the average:</em></div>
<div id="_mcePaste"><em>average2 = total2 / numReadings;</em></div>
<div id="_mcePaste"><em>// send it to the computer</em></div>
<div id="_mcePaste"><em>Serial.println(average2);</em></div>
<div id="_mcePaste"><em>}</em></div>
<div id="_mcePaste"><em>// wait a bit for the analog-to-digital converter</em></div>
<div id="_mcePaste"><em>// to stabilize after the last reading:</em></div>
<div id="_mcePaste"><em>delay(20);</em></div>
<div id="_mcePaste"><em>}</em></div>
<p><span style="text-decoration: underline;"><br />
</span><br />
<span style="text-decoration: underline;">Processing:</span></p>
<div>
<div>import processing.serial.*;</div>
<div>Serial myPort;        // The serial port</div>
<div>// Declaring a variable of type PImage</div>
<div>PImage img;</div>
<div>void setup () {</div>
<div>// set the window size:</div>
<div>size(600, 400);</div>
<div>// List all the available serial ports</div>
<div>println(Serial.list());</div>
<div>// Open whatever port is the one you&#8217;re using.</div>
<div>myPort = new Serial(this, Serial.list()[1], 9600);</div>
<div>// don&#8217;t generate a serialEvent() unless you get a newline character:</div>
<div>myPort.bufferUntil(&#8216;\n&#8217;);</div>
<div>// set inital background:</div>
<div>background(0,0,0);</div>
<div>// Make a new instance of a PImage by loading an image file</div>
<div>img = loadImage(&#8220;penguin_pan.jpg&#8221;);</div>
<div>}</div>
<div>void draw () {</div>
<div>// everything happens in the serialEvent()</div>
<div>}</div>
<div>void serialEvent (Serial myPort) {</div>
<div>// get the ASCII string:</div>
<div>String inString = myPort.readStringUntil(&#8216;\n&#8217;);</div>
<div>if (inString != null) {</div>
<div>// trim off any whitespace:</div>
<div>inString = trim(inString);</div>
<div>// convert to an int</div>
<div>float inByte = float(inString);</div>
<div>// for left, convert back to correct signal</div>
<div>if (inByte &gt; 3000) {</div>
<div>inByte = inByte-3000;</div>
<div>}</div>
<div>// for right, convert to negative signal</div>
<div>else {</div>
<div>inByte= -inByte;</div>
<div>}</div>
<div>// map to panorama</div>
<div>inByte = map(inByte, 0, 1023, 0, 735);</div>
<div>// draw the panorama at correct position</div>
<div>image(img,-735+inByte,0);</div>
<div>}</div>
<div>}</div>
</div>
<p><span><br />
</span><br />
<strong>Inside Tom (Digital Rotation Sensor):</strong><br />
<span style="text-decoration: underline;">Arduino:</span></p>
<div>
<div>void setup() {</div>
<div>// initialize the serial communication:</div>
<div>Serial.begin(9600);</div>
<div>// set inputs to high</div>
<div>digitalWrite(3, HIGH);</div>
<div>digitalWrite(5, HIGH);</div>
<div>digitalWrite(6, HIGH);</div>
<div>digitalWrite(9, HIGH);</div>
<div>digitalWrite(10, HIGH);</div>
<div>}</div>
<div>void loop() {</div>
<div>// output number in serial monitor when connected</div>
<div>if (digitalRead(3)== LOW) {</div>
<div>Serial.println(1);</div>
<div>}</div>
<div>else if (digitalRead(5)== LOW) {</div>
<div>Serial.println(2);</div>
<div>}</div>
<div>else if (digitalRead(6)== LOW) {</div>
<div>Serial.println(3);</div>
<div>}</div>
<div>else if (digitalRead(9)== LOW) {</div>
<div>Serial.println(4);</div>
<div>}</div>
<div>else if (digitalRead(10)== LOW) {</div>
<div>Serial.println(5);</div>
<div>}</div>
<div>// wait a bit for the analog-to-digital converter</div>
<div>// to stabilize after the last reading:</div>
<div>delay(10);</div>
<div>}</div>
</div>
<p><span style="text-decoration: underline;"><br />
</span><br />
<span style="text-decoration: underline;">Processing:</span></p>
<div>
<div>import processing.serial.*;</div>
<div>Serial myPort;        // The serial port</div>
<div>// Declaring a variable of type PImage</div>
<div>PImage img;</div>
<div>// initialize coordinate and scrolling speed</div>
<div>int c =-400;</div>
<div>int tick = 1;</div>
<div>void setup () {</div>
<div>// set the window size:</div>
<div>size(800, 659);</div>
<div>// List all the available serial ports</div>
<div>println(Serial.list());</div>
<div>// Open whatever port is the one you&#8217;re using.</div>
<div>myPort = new Serial(this, Serial.list()[1], 9600);</div>
<div>// don&#8217;t generate a serialEvent() unless you get a newline character:</div>
<div>myPort.bufferUntil(&#8216;\n&#8217;);</div>
<div>// set inital background:</div>
<div>background(0,0,0);</div>
<div>// Make a new instance of a PImage by loading an image file</div>
<div>img = loadImage(&#8220;snow_pan.jpg&#8221;);</div>
<div>}</div>
<div>void draw () {</div>
<div>// everything happens in the serialEvent()</div>
<div>}</div>
<div>void serialEvent (Serial myPort) {</div>
<div>// get the ASCII string:</div>
<div>String inString = myPort.readStringUntil(&#8216;\n&#8217;);</div>
<div>if (inString != null) {</div>
<div>// trim off any whitespace:</div>
<div>inString = trim(inString);</div>
<div>// convert to an int</div>
<div>float inByte = float(inString);</div>
<div>if (inByte==1 &amp;&amp; c&gt;=-786) {</div>
<div>c = c-tick;</div>
<div>}</div>
<div>else if (inByte==2) {</div>
<div>if (c&gt;=-524) {</div>
<div>c= c-tick;</div>
<div>}</div>
<div>else {</div>
<div>c= c+tick;</div>
<div>}</div>
<div>}</div>
<div>else if (inByte==3) {</div>
<div>if (c&gt;=-262) {</div>
<div>c= c-tick;</div>
<div>}</div>
<div>else {</div>
<div>c= c+tick;</div>
<div>}</div>
<div>}</div>
<div>else if (inByte==4 &amp;&amp; c&lt;0) {</div>
<div>c= c+tick;</div>
<div>}</div>
<div>// draw the panorama at correct position</div>
<div>image(img,c,0);</div>
<div>}</div>
<div>}</div>
</div>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1983</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warp Weft Resistor</title>
		<link>http://newtextiles.media.mit.edu/?p=1938</link>
		<comments>http://newtextiles.media.mit.edu/?p=1938#comments</comments>
		<pubDate>Sat, 19 Mar 2011 02:57:47 +0000</pubDate>
		<dc:creator>Sheralyn Woon</dc:creator>
				<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1938</guid>
		<description><![CDATA[My project for this week is focused on the difference in behavior of a stretch sensor following the direction of the yarn (weft) or perpendicularly across the direction of the yarn (warp). Knitting doesn&#8217;t really have a wrap or a weft but just to use familiar terms, I&#8217;ve chosen to use these. I-cord, Basic Knit, [...]]]></description>
			<content:encoded><![CDATA[
<a href='http://newtextiles.media.mit.edu/?attachment_id=1952' title='MITPrj5'><img width="150" height="100" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrj5.jpg" class="attachment-thumbnail" alt="MITPrj5" title="MITPrj5" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1953' title='MITPrj5a'><img width="150" height="99" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrj5a.jpg" class="attachment-thumbnail" alt="MITPrj5a" title="MITPrj5a" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1954' title='MITPrj5b'><img width="117" height="150" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITPrj5b.jpg" class="attachment-thumbnail" alt="MITPrj5b" title="MITPrj5b" /></a>
<a href='http://newtextiles.media.mit.edu/?attachment_id=1974' title='MITProject5C'><img width="150" height="111" src="http://newtextiles.media.mit.edu/wp-content/uploads/2011/03/MITProject5C.jpg" class="attachment-thumbnail" alt="MITProject5C" title="MITProject5C" /></a>

<p>My project for this week is focused on the difference in behavior of a stretch sensor following the direction of the yarn (weft) or perpendicularly across the direction of the yarn (warp). Knitting doesn&#8217;t really have a wrap or a weft but just to use familiar terms, I&#8217;ve chosen to use these. </p>
<p>I-cord, Basic Knit, Seed &amp; Cable<br />
I started with small samples of knitting, incorporating the conductive stainless steel thread or aluminum yarn. I used very simple basic patterns. And hooked up the samples to the Arduino in 2 ways: warp or weft.  The I-cord was rather noisy, the signal was not consistent. For the basic knit pattern, it was difficult to see a difference in resistance at first as I had used the ellipse shape, but there seemed to be a difference in the size of the circle on the screen. I also found that when using the aluminum yarn the size of the circle was a bit larger. So I thought that I could exaggerate these differences by making a knitted resistor of a different shape using the aluminum yarn.</p>
<p>Warp Weft Resistor<br />
Using garter stitch, wool &amp; aluminum yarn are knit together. This knitted resistor has very clearly defined ribbing as a warp structure. Along the weft, small extensions were knitted in addition to original structure and helps us stretch out the more rigid ribbing in the center without displacing the alligator clips at the ends during testing. The extensions were also to make sure that warp and weft length were similar. I used the ellipse visualization. I was clear that along warp and weft this resistor was registering different resistances but somehow I couldn&#8217;t get a sense if my theory was correct.<br />
After speaking to Leah about the Warp Weft Resistor and how it was reacting to the Arduino, I decided to change the programming and use a method of visualization that could let me see the magnitude of the resistance over time. I reverted back to the original programming but integrated some color by using code that Crystal had taught me. So now when the resistance is high, a long pink line registers. If the resistance is low, a short blue line registers.<br />
Findings: Resistance along the warp is higher than that on the weft. The signal from the warp is steadier and varies less while the weft varies a lot and quite quickly. Range of resistance of the warp is slightly wider than that of the weft.<br />
After playing with it for a while, I realized that when the resistor is hooked up along the weft, it can be used as a pressure sensor too.</p>
<p>Cable<br />
I knitted this just to test the antithesis of my theory. Hence, using the stainless steel thread, I knitted a cable which has more rigidity than garter stitch. Resistance is generally low and doesn&#8217;t vary which might be caused by the cable which doesn&#8217;t stretch much.</p>
<p><strong>Processing Code</strong></p>
<p>// Graphing sketch</p>
<p> // This program takes ASCII-encoded strings<br />
 // from the serial port at 9600 baud and graphs them. It expects values in the<br />
 // range 0 to 1023, followed by a newline, or newline and carriage return</p>
<p> // Created 20 Apr 2005<br />
 // Updated 18 Jan 2008<br />
 // by Tom Igoe<br />
 // This example code is in the public domain.</p>
<p> import processing.serial.*;</p>
<p> Serial myPort;        // The serial port<br />
 int xPos = 1;         // horizontal position of the graph</p>
<p> void setup () {<br />
 // set the window size:<br />
 size(800, 600);</p>
<p> // List all the available serial ports<br />
 println(Serial.list());<br />
 // I know that the first port in the serial list on my mac<br />
 // is always my  Arduino, so I open Serial.list()[0].<br />
 // Open whatever port is the one you&#8217;re using.<br />
 myPort = new Serial(this, Serial.list()[0], 9600);<br />
 // don&#8217;t generate a serialEvent() unless you get a newline character:<br />
 myPort.bufferUntil(&#8216;\n&#8217;);<br />
 // set inital background:<br />
 background(0);<br />
 }<br />
 void draw () {<br />
 // everything happens in the serialEvent()<br />
 }</p>
<p> void serialEvent (Serial myPort) {<br />
 // get the ASCII string:<br />
 String inString = myPort.readStringUntil(&#8216;\n&#8217;);</p>
<p> if (inString != null) {<br />
 // trim off any whitespace:<br />
 inString = trim(inString);<br />
 // convert to an int and map to the screen height:<br />
 float inByte = float(inString);<br />
 int changing = int(map(inByte, 0, 1023, 0, 255));<br />
 inByte = map(inByte, 0, 1023, 0, height);</p>
<p> // draw the line:<br />
 stroke(changing,34,random(255));<br />
 line(xPos, height, xPos, height &#8211; inByte);</p>
<p> // at the edge of the screen, go back to the beginning:<br />
 if (xPos &gt;= width) {<br />
 xPos = 0;<br />
 background(0);<br />
 }<br />
 else {<br />
 // increment the horizontal position:<br />
 xPos++;<br />
 }<br />
 }<br />
 }</p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1938</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Textile Sensor</title>
		<link>http://newtextiles.media.mit.edu/?p=1828</link>
		<comments>http://newtextiles.media.mit.edu/?p=1828#comments</comments>
		<pubDate>Tue, 15 Mar 2011 16:27:06 +0000</pubDate>
		<dc:creator>leah buechley</dc:creator>
				<category><![CDATA[Assignments]]></category>
		<category><![CDATA[Textile Sensor]]></category>

		<guid isPermaLink="false">http://newtextiles.media.mit.edu/?p=1828</guid>
		<description><![CDATA[Due: Tuesday, March 29, 2011 See student sensors here For this assignment you will create a soft, flexible, textile-based sensor and a simple screen-based interface that displays information from the sensor. Part 1. Felt, knit, sew, fuse, or crochet a soft sensor. Document your construction process with pictures. Write a paragraph that describes your sensor [...]]]></description>
			<content:encoded><![CDATA[<p>Due: Tuesday, March 29, 2011<br />
<a href="http://newtextiles.media.mit.edu/?cat=17">See student sensors here</a></p>
<p>For this assignment you will create a soft, flexible, textile-based sensor and a simple screen-based interface that displays information from the sensor.<br />
<span id="more-1828"></span></p>
<p>Part 1.  Felt, knit, sew, fuse, or crochet a soft sensor.  Document your construction process with pictures.  Write a paragraph that describes your sensor and a scenario for its use.  If your sensor is a resistive sensor, use the multimeter to measure its resting and activated resistances and include this information in your paragraph.</p>
<p>Part 2.  Connect your sensor to an Arduino (you will be loaned an Arduino for the duration of this assignment).  Write a simple Arduino program that takes readings from your sensor and sends them to the computer.  Write a simple Processing program that uses the data from the Arduino to create an interactive program&#8211;a small game&#8211;that can be controlled with your sensor.  Take a video of your sensor controlling your program.  Include your video and your Arduino and Processing code in your write-up.  This <a href="http://www.arduino.cc/en/Tutorial/Graph">tutorial</a> will be useful.  Note: don&#8217;t permanently attach your sensor to the Arduino.  You will return the Arduino on March 29.</p>
<p>Create a post that documents your project as described above and add it to the Textile Sensor category. </p>
<p>Bring your projects to class on March 29 for demonstrations.  </p>
]]></content:encoded>
			<wfw:commentRss>http://newtextiles.media.mit.edu/?feed=rss2&#038;p=1828</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
