<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>pComp - short circuit</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/" />
    <link rel="self" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/pComp/atom.xml" />
   <id>tag:itp.nyu.edu,2006:/~ye265/pComp/3</id>
    <link rel="service.post" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3" title="pComp - short circuit" />
    <updated>2006-12-15T01:25:34Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.2</generator>
 
<entry>
    <title>Final - Documentation and Special Thanks!</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/12/final_documentation_and_specia.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=35" title="Final - Documentation and Special Thanks!" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.35</id>
    
    <published>2006-12-15T01:23:19Z</published>
    <updated>2006-12-15T01:25:34Z</updated>
    
    <summary>My documenation for the final project is availabe at: http://evasivhologram.wordpress.com/ I would like to say a special Thank you to Christian Bovine for helping me build the enclosure. He showed me the basics of wood working, and without him, my...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p>My documenation for the final project is availabe at:</p>

<p><a href="http://evasivhologram.wordpress.com/">http://evasivhologram.wordpress.com/</a></p>

<p>I would like to say a special Thank you to Christian Bovine for helping me build the enclosure. He showed me the basics of wood working, and without him, my project wouldn't be complete! </p>]]>
        
    </content>
</entry>
<entry>
    <title>Final - 4 week mark</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/12/final_4_week_mark.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=32" title="Final - 4 week mark" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.32</id>
    
    <published>2006-12-10T05:28:12Z</published>
    <updated>2006-12-10T06:00:52Z</updated>
    
    <summary>Little creature This is the monster that will run around the screen. He will do the following things: a. run away from you. He runs away and flaps his arms as his feet move unreasonably fast. b. if no one...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p><u>Little creature</u></p>

<p><img alt="animated yellow monster.GIF" src="http://itp.nyu.edu/~ye265/pComp/animated%20yellow%20monster.GIF" width="300" height="225" /></p>

<p>This is the monster that will run around the screen. He will do the following things:<br />
a. run away from you. He runs away and flaps his arms as his feet move unreasonably fast. <br />
b. if no one is trying to catch him, he stands around for a while.<br />
c. after standing around, he'll get bored and start waving at you.<br />
d. after a while, he'll taunt you, by sticking his tounge out at you. </p>

<p>The animation responds to mouse-x, y positions. It is a series of GIF images that are pulled dynamically in processing, depending on the state of the creature and his relationship with the user. </p>

<p><u>Motion Tracking</u><br />
I decided to start all over. I discovered a reason not to use jitter: the JMyron library in processing! This library uses DirectX for video capturing, and so all my problems are solved. I am more comfortable with code than with graphical programming (Jitter), so I decided to start all over for the motion tracking part. </p>

<p>A JMyron is a camera object  that uses directX and that allows us to specify things like how sensitive a camera is how often it adapts, etc. I relied heavily on the code examples that came with the library. But this is the basic logic: I take a picture of the current background before startting the motion tracking part. Then I call the differenceImage function of the camera object that will take a difference of the "control" image and the new image and finds the difference between. This differenced image is what I use for tracking. The differenced image will create white spots/areas where the differences are, and the JMyron will track white in the Matrix. All the points of change are then averaged to get a center point, or the average location of motion. </p>

<p><u>Camera Location </u><br />
The camera is now located at the ceiling of the box, pointing downwards at a 20 degree angle. The plexi will be angled at 45 degree, and the monitor will be angled to create the illusion of a hollogram in the camera's direct line of sight. </p>

<p>Todo:<br />
Now I need to build an enclosure to hide everything. I also need to make a button to reset things, and maybe (if I have time) allow the user to scroll through different hollographic characters using a variable restistor. </p>]]>
        <![CDATA[<p><u>The Code</u></p>

<p>import JMyron.*;</p>

<p>JMyron m;//a camera object</p>

<p>//variables to maintain the floating green circle<br />
float objx = 640; //160;<br />
float objy = 350; //120;<br />
float objdestx = 640; //160;<br />
float objdesty = 350; //120;</p>

<p>//animated creature clips<br />
AniSprite waving, walking, teasing, standing;<br />
//float xpos, ypos;<br />
float drag = 30.0;</p>

<p>int TEASE_STATE = 500;<br />
boolean teaseState = false;<br />
int teaseframes = 31;<br />
int currentSt = 0;</p>

<p>int CAMERA_WIDTH  = 320;<br />
int CAMERA_HEIGHT = 240;</p>

<p>void setup()<br />
{<br />
  size(1280, 800); //960);<br />
  background(0,0,0); //255, 204, 0);<br />
  frameRate(30);<br />
  waving = new AniSprite("wave", 17); <br />
  walking = new AniSprite("step", 9); <br />
  teasing = new AniSprite("tease", teaseframes);<br />
  standing = new AniSprite("stand", 11);<br />
 <br />
  //capturing junk<br />
  m = new JMyron();//make a new instance of the object<br />
  m.start(CAMERA_WIDTH, CAMERA_HEIGHT);//start a capture at 320x240<br />
  m.trackColor(255,255,255,256*3-100);//track white<br />
  m.update(); //called once per frame, updates vision processing and camera updating<br />
  m.adaptivity(10); //how fast/often retina image adapts!<br />
  m.adapt();// immediately take a snapshot of the background for differencing<br />
  println("Myron " + m.version());<br />
  rectMode(CENTER);<br />
  noStroke();<br />
  <br />
  <br />
}</p>

<p>void draw()<br />
{ <br />
  <br />
  m.update();//update the camera view<br />
  drawCamera();<br />
  <br />
  int[][] centers = m.globCenters();//get the center points<br />
  println("centers size = " + centers.length);<br />
  //draw all the dots while calculating the average.<br />
  float avX=0;<br />
  float avY=0;<br />
  for(int i=0;i<centers.length;i++){<br />
    fill(80);<br />
    rect(centers[i][0],centers[i][1],5,5);<br />
    avX += centers[i][0];<br />
    avY += centers[i][1];<br />
  }<br />
  if(centers.length-1>0){<br />
    avX/=centers.length-1;<br />
    avY/=centers.length-1;<br />
  }</p>

<p>  //draw the average of all the points in red.<br />
  fill(255,0,0);<br />
  rect(avX,avY,5,5);</p>

<p>  //update the location of monster<br />
  if(!(avX==0&&avY==0)&&centers.length>0){<br />
    objdestx = avX*3.75;<br />
    objdesty = avY*3.75;<br />
    println("X = " + avX + ", Y = " + avY);<br />
    println("objx = " + objx);<br />
    println("objdestx - ojx = " + ( (objdestx - objx)/10.0f));<br />
  } //else there is no movement, pull out teasing here<br />
  <br />
  objx += (objdestx-objx)/10.0f;<br />
  objy += (objdesty-objy)/10.0f;<br />
  <br />
  objx = constrain(objx, 0, width - walking.getWidth());<br />
  objy = constrain(objy, 0, height - walking.getHeight());<br />
  <br />
/* <br />
  //DRAWING THE CREATURE<br />
  //think of difx as the new direction and drag as the speed /<br />
  float difx = objdestx - objx; //mouseX - xpos;<br />
  float dify = objdesty - objy; //mouseY - ypos;<br />
  if(abs(difx) > 1.0) { <br />
    objx = objx + difx/drag;<br />
    objx = constrain(objx, 0, width);<br />
    //xpos = xpos + difx/drag;<br />
    //xpos = constrain(xpos, 0, width);<br />
  }<br />
  <br />
  if(abs(dify) > 1.0) {<br />
    objy = objy + dify/drag;<br />
    objy = constrain(objy, 0, width);<br />
    //ypos = ypos + dify/drag;<br />
    //ypos = constrain(ypos, 0, width); <br />
  }*/<br />
  <br />
  background(0,0,0);</p>

<p>  println("currentSt = " + currentSt);</p>

<p>  // Display the sprite at the position xpos, ypos<br />
/*  if(mousePressed) {<br />
    //background(153, 153, 0);<br />
    //waving.display(xpos-waving.getWidth()/2, ypos);<br />
    //waving.display(objx, objy);<br />
    teasing.display(objx-waving.getWidth()/2, objy);<br />
  }<br />
 else */<br />
 if(centers.length == 0){<br />
    <br />
    currentSt++;<br />
    if(currentSt == TEASE_STATE){<br />
      teaseState = true;<br />
      currentSt = 0;<br />
    }<br />
    <br />
    if(teaseState){  <br />
      if(currentSt <= teaseframes) teasing.display(objx, objy);<br />
      else {<br />
        currentSt = 0;<br />
        teaseState = false;<br />
        waving.display(objx, objy);<br />
      }<br />
    }<br />
    else {<br />
      //make monster wave at the user, but only after an interval of boredeom (just standing)<br />
      if((currentSt < 150) || ((currentSt > 300) && (currentSt < 400)) ) {<br />
        standing.display(objx, objy);<br />
      }else waving.display(objx, objy); //objx-waving.getWidth()/2, objy);<br />
    }<br />
    <br />
  } else {<br />
    //background(255, 204, 0);<br />
    walking.display(objx, objy); //xpos-waving.getWidth()/2, ypos);<br />
  }<br />
}</p>

<p><br />
void drawCamera(){<br />
  //for debug:<br />
  //m.cameraImage returns reg image<br />
  //m.retinaImage returns image adapting to camera<br />
  //m.globsImage returns globs preview<br />
  //m.differenceImage returns image diff<br />
  int[] img = m.differenceImage(); //get the normal image of the camera<br />
  loadPixels();<br />
  //for(int i=0;i<CAMERA_WIDTH*CAMERA_HEIGHT;i++){ //loop through all the pixels<br />
  //  pixels[i] = img[i]; //draw each pixel to the screen<br />
  //}<br />
  updatePixels();<br />
}</p>

<p>/*<br />
void mousePressed(){<br />
  m.settings();//click the window to get the settings<br />
}*/</p>

<p>public void stop(){<br />
  m.stop();//stop the object<br />
  super.stop();<br />
}</p>

<p>// Class for animating GIFs</p>

<p>class AniSprite<br />
{<br />
  PImage[] ani;<br />
  int frame;<br />
  int numFrames;<br />
  <br />
  AniSprite(String imageName, int frameCount) {<br />
    numFrames = frameCount;<br />
    ani = new PImage[numFrames];<br />
    loadImages(imageName);<br />
  }</p>

<p>  void loadImages(String name) {<br />
    for(int i=0; i<numFrames; i++) {<br />
      String imageName = name + i + ".gif";<br />
      ani[i] = loadImage(imageName);<br />
    }<br />
  }</p>

<p>  void display(float xpos, float ypos)<br />
  {<br />
    frame = (frame+1)%numFrames;<br />
    image(ani[frame], xpos, ypos);<br />
  }<br />
  <br />
  int getWidth() {<br />
    return ani[0].width;<br />
  }</p>

<p>  int getHeight(){<br />
    return ani[0].height;<br />
  }<br />
}</p>]]>
    </content>
</entry>
<entry>
    <title>My HD Crashed ! </title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/12/final_3_week_mark.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=31" title="My HD Crashed ! " />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.31</id>
    
    <published>2006-12-10T04:56:36Z</published>
    <updated>2006-12-10T05:27:35Z</updated>
    
    <summary>Of all weeks for something like this to happen, it had to be during FINALS week. My hardrive failed me. I wasn&apos;t able to long onto my computer or access any of my files. I called the technical support and...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p>Of all weeks for something like this to happen, it had to be during FINALS week. My hardrive failed me. I wasn't able to long onto my computer or access any of my files. I called the technical support and they had to run a few system checks and concluded that something is wrong with my hardrive. I will be getting a new HD in January, and I cannot acces my FINALS or retrieve them. </p>

<p>It took a day to figure out a way to hack into the hardrive without logging into my computer, using the command prompt. I manually copied every file, by file, that I needed into an external drive. It was tedious, annoying, but I'm thankful I didn't lose all my work. </p>]]>
        
    </content>
</entry>
<entry>
    <title>Final - 2 week mark</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/11/final_2_week_mark.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=30" title="Final - 2 week mark" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.30</id>
    
    <published>2006-11-20T18:01:11Z</published>
    <updated>2006-11-20T18:12:36Z</updated>
    
    <summary>Final project notes: Baby steps/Phases 1. enclosure 2. hollogram 3. hand detection 4. videos of creature (or maybe animation) 5. max/msp/jitter Failures 0. plate glass 1. projection 2. mirrors (spherical/regular flat) 3. IR sensors in the 10 - 80 cm...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p><u>Final project notes:</u></p>

<p><strong>Baby steps/Phases</strong></p>

<p>1. enclosure<br />
2. hollogram<br />
3. hand detection<br />
4. videos of creature (or maybe animation)<br />
5. max/msp/jitter</p>

<p><strong>Failures</strong></p>

<p>0. plate glass<br />
1. projection<br />
2. mirrors (spherical/regular flat)<br />
3. IR sensors in the 10 - 80 cm range</p>

<p><strong>Status</strong></p>

<p>1. New setup using a PC monitor <br />
2. 45 degree angled plexi</p>

<p><img alt="setup.jpg" src="http://itp.nyu.edu/~ye265/pComp/setup.jpg" width="428" height="220" /></p>

<p></p>

<p><strong>Problems</strong></p>

<p>1. Detection mechanism: setup isn't accurate enough!!!<br />
    Proposed Compromise:  will probably use Video Tracking (pcomp book) + IR in the back end.<br />
2. Interaction w/ the creature: where hands enter in a realistic manner<br />
    Proposed Compromise: Black cloth, sleeves, no gloves :)</p>

<p><br />
</p>]]>
        
    </content>
</entry>
<entry>
    <title>Lab 6: Mini, Midi, Mici</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/11/lab_6_mini_midi_mici.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=29" title="Lab 6: Mini, Midi, Mici" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.29</id>
    
    <published>2006-11-18T18:01:04Z</published>
    <updated>2006-11-18T18:04:26Z</updated>
    
    <summary> The Midi lab was probably the most confusing, complicated lab I&apos;ve done. I worked with Sinan and we were amibitious. We initially wanted to use my PC and Adobe Audition to read the Midi channel and play whatever signals...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p><img alt="midi lab 4web.jpg" src="http://itp.nyu.edu/~ye265/pComp/midi%20lab%204web.jpg" width="500" height="375" /></p>

<p>The Midi lab was probably the most confusing, complicated lab I've done. I worked with Sinan and we were amibitious. We initially wanted to use my PC and Adobe Audition to read the Midi channel and play whatever signals we were sending it. The programs would detect signals, but for some reason we couldnt' get that setup to work. Probably because neither of us had any expereince with the program. </p>

<p>So we resorted to the Midi synthesizer box. The code for the lab didn't work for us, and after debugging for like an hour, we just wrote our own code that was simple and straightforward that allows a user to play using a potentiometer. </p>

<p>I will probably need to work with Midi for my final project because it's faster the serial communication. :( </p>]]>
        
    </content>
</entry>
<entry>
    <title>Midterm :: a prototype</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/10/midterm_a_prototype.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=25" title="Midterm :: a prototype" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.25</id>
    
    <published>2006-10-31T17:01:31Z</published>
    <updated>2006-11-18T17:54:49Z</updated>
    
    <summary>Please visit the site to see images, production stills, background information, and code from our midterm project: http://www.solidhang.com/h2oracle/ We decided to create an oracle. A bowl of water that will be displaying random, beautiful images until a user comes up...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p>Please visit the site to see images, production stills, background information, and code from our midterm project:  <a href="http://www.solidhang.com/h2oracle/">http://www.solidhang.com/h2oracle/</a></p>

<p>We decided to create an oracle. A bowl of water that will be displaying random, beautiful images until a user comes up to it, waves his/her hand over the bowl of water, asking it a question. The oracle will then respond by displaying a vision/image answering the user's qeury. </p>]]>
        
    </content>
</entry>
<entry>
    <title>Lab 5 :: Serial Communication</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/10/lab_5_serial_communication.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=14" title="Lab 5 :: Serial Communication" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.14</id>
    
    <published>2006-10-12T00:06:36Z</published>
    <updated>2006-10-12T00:43:03Z</updated>
    
    <summary>I used a flex sensor and a potentiometer as my analog inputs. The arduino program was very straight forward. I intend to sit down and play a bit more with serial communication and different sensors for some applications I have...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p>I used a flex sensor and a potentiometer as my analog inputs. The arduino program was very straight forward. I intend to sit down and play a bit more with serial communication and different sensors for some applications I have in mind.</p>

<p>The first image is the setup, the second image is the 3 byte output of the arduino, after it recieves a byte input through the serial port.</p>

<p>I'm using serial port COM4 for communication between the processing language and the arduino. TODO: Customize the processing program for another interesting graphic application. Maybe a game w/ a joystick?</p>

<p><a href="http://itp.nyu.edu/~ye265/pComp/lab5_sm.jpg"><img alt="lab5_sm.jpg" src="http://itp.nyu.edu/~ye265/pComp/lab5_sm-thumb.jpg" width="500" height="375" /></a></p>

<p><a href="http://itp.nyu.edu/~ye265/pComp/lab5_output_sm.jpg"><img alt="lab5_output_sm.jpg" src="http://itp.nyu.edu/~ye265/pComp/lab5_output_sm-thumb.jpg" width="500" height="375" /></a><br />
</p>]]>
        
    </content>
</entry>
<entry>
    <title>Observation :: Bus Vs Subway</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/10/observation_bus_vs_subway.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=11" title="Observation :: Bus Vs Subway" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.11</id>
    
    <published>2006-10-02T06:40:34Z</published>
    <updated>2006-10-02T06:53:59Z</updated>
    
    <summary>I had decided to observe people&apos;s use of digital devices during a day I was navigating through the city by subway, bus, and just plain walking... 11:00 am - L Train, 1st avenue. People were using the machines to charge...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p>I had decided to observe people's use of digital devices during a day I was navigating through the city by subway, bus, and just plain walking...</p>

<p>11:00 am - L Train, 1st avenue. People were using the machines to charge their MTA cards. People were swiping their cards. </p>

<p>11:15 am - L Train, moving. Almost 1 in every 2 people have headphones on. I'm assuming they're iPods. </p>

<p>11:40 am - M5 Train. There is a sign at the front of the bus that has 6 colored segments that light up when someone pays the bus fee. The "Adult" segment lights up when someone swipes their MTA card or pays in coins.</p>

<p>12:00 pm - M5 Train. People were swiping their MTA cards, to pay for the ride. People were pressing the tape to stop the bus. </p>

<p>12:15 pm - M5 Train, heading uptown. The radio informing the bus driver of the traffic, allowing communication in the bus network.</p>

<p>1:00 pm - M5 Train. A lady in front of me is talking on her cell phone.</p>

<p>1:15 pm - M5 Train. A man w/ headphones boards the bus. Followed by another gentleman. Probably some sort of mp3 player. </p>

<p>1:16 pm - M5 Train. Another woman is chatting animatedly on her cell phone. </p>

<p><skip a few hours...></p>

<p>4:00 pm - My apartment. The radio is blasting in my roommate's bedroom. </p>

<p>5:00 pm - My apartment. My roommate is on her cell phone. I'm on my laptop, using the wireless router to connect to the internet. </p>

<p><br />
</p>]]>
        
    </content>
</entry>
<entry>
    <title>Lab 4 :: Servo</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/10/lab_5_servo.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=10" title="Lab 4 :: Servo" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.10</id>
    
    <published>2006-10-01T09:17:35Z</published>
    <updated>2006-10-12T00:51:50Z</updated>
    
    <summary> After the lab, I had tried to make the servo motor move like a wheel, only to discover this is not how a servo motor moves. So, instead we decided to work with another variable resistr - the flex...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p><a href="http://itp.nyu.edu/~ye265/pComp/IMG_0638.JPG"><img alt="IMG_0638.JPG" src="http://itp.nyu.edu/~ye265/pComp/IMG_0638-thumb.JPG" width="600" height="450" /></a></p>

<p>After the lab, I had tried to make the servo motor move like a wheel, only to discover this is not how a servo motor moves. So, instead we decided to work with another variable resistr - the flex sensor alongside a vibrator. We wanted the flex sensor to control the intensity of the vibrator. The more you flex, the higher the vibration. If the flex sensor is straight, then the vibrator is still</p>

<p>We were thinking we might use a vibrator in our midterm project idea #1 - the hospital-friendly pet; whenever a child would hold it/pet it, it would purr/vibrate.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Lab 3 :: Analog In</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/10/lab_3_analog_in.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=9" title="Lab 3 :: Analog In" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.9</id>
    
    <published>2006-10-01T09:14:55Z</published>
    <updated>2006-10-12T00:54:11Z</updated>
    
    <summary> I did this lab and Lab 4 together, since it was the most logical next step....</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p><a href="http://itp.nyu.edu/~ye265/pComp/IMG_0637.JPG"><img alt="IMG_0637.JPG" src="http://itp.nyu.edu/~ye265/pComp/IMG_0637-thumb.JPG" width="600" height="450" /></a></p>

<p>I did this lab and Lab 4 together, since it was the most logical next step.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Lab 2 :: The Advent of Arduino </title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/09/lab_2_the_advent_of_arduino.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=6" title="Lab 2 :: The Advent of Arduino " />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.6</id>
    
    <published>2006-09-21T06:32:57Z</published>
    <updated>2006-09-21T17:49:03Z</updated>
    
    <summary>I finally got my Arduino, and so I sat down to play with it. I downloaded the Arduino software and I had to download and install 2 drivers. That part of the lab wasn&apos;t very comprehensive - I had to...</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p>I finally got my Arduino, and so I sat down to play with it. I downloaded the Arduino software and I had to download and install 2 drivers. That part of the lab wasn't very comprehensive - I had to read the installation notes on the Arduino site.</p>

<p>Once the platform was configured, programming the microcontroller was simple. I attemped to do the combination lock at first, since I didn't read Carlyn's email at that moment of time...</p>

<p><a href="http://itp.nyu.edu/~ye265/pComp/lab2%20a_sm.html"  align=center onclick="window.open('http://itp.nyu.edu/~ye265/pComp/lab2%20a_sm.html','popup','width=160,height=120,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://itp.nyu.edu/~ye265/pComp/lab2%20a_sm-thumb.jpg" width="160" height="120" alt="" ALIGN=MIDDLE /></a></p>

<p><u>Plan a :: Combo Lock</u><br />
I was working with Christian at the time, and his idea was to create a combination lock that requires 2 switches to be on, and the 3rd switch needed to be clicked 3 times consecutively to open the lock. We signified this w/ 2 yellow LEDs lighting up. Any wrong combo would result w/ a 3rd green LED emiting light. The difficulty of this combo lock was:<br />
1. Our switch was the "state" switch (for lack of the tech-term), in which you do not know the state of it - hrigh or low.  So we needed a way to consider 3 clicks, or rather 3 toggled state changes in sequence.<br />
2. The Arduino's main function is the loop function wich iterates in the range of milliseconds. So in order to sample the state of our switch in time, and click it before the loop iterates, we need to force a delay. </p>

<p>So the main algorithm behind the program was having 3 state variables for the three switches, plus an additional previous state (prevState) variable which will save the last state of the 3rd switch., so we can check for the 3 toggled state changes. Also I added a delay of 500 ms. </p>

<p>This algorithm worked, but when the combo was "unlocked" the LEDs would blink very briefly, b/c of the new loop iteration. But it wasn't a good design b/c of the speed of sampling and coinciding it with the clicks. </p>

<p>Bottom line: I would not use a regular on/off or toggle switch for a combo lock. I just had no other resources.<br />
<a href="http://itp.nyu.edu/~ye265/pComp/combo%20lock.txt">View Combo Lock File</a></p>

<p><a href="http://itp.nyu.edu/~ye265/pComp/lab%202%20combo%20lock1.html" onclick="window.open('http://itp.nyu.edu/~ye265/pComp/lab%202%20combo%20lock1.html','popup','width=600,height=450,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://itp.nyu.edu/~ye265/pComp/lab%202%20combo%20lock-thumb.JPG" width="160" height="120" alt="" /></a></p>

<p></p>

<p><u>Plan b :: Binary Counter </u><br />
When I finally read Carlyn's email, I decided the best use I could make of 3 switches and 5 LEDs was to create a binary counter/timer that would go up to 2^5, then restart. These are the specs:<br />
1. Switch 1 - turned on the binary counter and sustains it. if switch 1 is open, then the counter will pause, but save state.<br />
2. Switch 2 - would turn on/off the serial communiation between the microcontroller and the pc. If turned on, the couner will print in the terminal, the current count in binary (e.g. 10101) ; if turned off, nothing is sent to the terminal.<br />
3. Switch 3 - was a reset button, which will clear all counters and turn off the LEDs.</p>

<p><a href="http://itp.nyu.edu/~ye265/pComp/binary_counter_serial_io.txt">View Binary Counter File</a></p>

<p><a href="http://itp.nyu.edu/~ye265/pComp/lab%202%20counter_sm.html" onclick="window.open('http://itp.nyu.edu/~ye265/pComp/lab%202%20counter_sm.html','popup','width=600,height=450,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://itp.nyu.edu/~ye265/pComp/lab%202%20counter_sm-thumb.jpg" width="160" height="120" alt="" /></a></p>

<p><a href="http://itp.nyu.edu/~ye265/pComp/lab%202%20counter%203_sm.html" onclick="window.open('http://itp.nyu.edu/~ye265/pComp/lab%202%20counter%203_sm.html','popup','width=600,height=450,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://itp.nyu.edu/~ye265/pComp/lab%202%20counter%203_sm-thumb.jpg" width="160" height="120" alt="" /></a><br />
</p>]]>
        
    </content>
</entry>
<entry>
    <title>Lab 1 ::  Light &apos;em up</title>
    <link rel="alternate" type="text/html" href="http://itp.nyu.edu/~ye265/pComp/2006/09/lab_1_light_em_up.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://itp.nyu.edu/~ye265/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=5" title="Lab 1 ::  Light 'em up" />
    <id>tag:itp.nyu.edu,2006:/~ye265/pComp//3.5</id>
    
    <published>2006-09-18T09:38:39Z</published>
    <updated>2006-09-21T08:24:59Z</updated>
    
    <summary> I&apos;ve learned that I&apos;m extremely clumsy w/ the solderng iron. I kept soldering the pins together, or breaking something, or just ruining it. Once THAT was out of the way, the rest of the lab was very straight forward....</summary>
    <author>
        <name>Yasmin Elayat</name>
        
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://itp.nyu.edu/~ye265/pComp/">
        <![CDATA[<p><a style="float: left" href="http://itp.nyu.edu/~ye265/pComp/IMG_0516.html" onclick="window.open('http://itp.nyu.edu/~ye265/pComp/IMG_0516.html','popup','width=1600,height=1200,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img right-margin="5px" src="http://itp.nyu.edu/~ye265/pComp/IMG_0516-thumb.JPG" width="160" height="120" alt="" /></a></p>

<p><a style="float: left" href="http://itp.nyu.edu/~ye265/pComp/IMG_0507.html" onclick="window.open('http://itp.nyu.edu/~ye265/pComp/IMG_0507.html','popup','width=1600,height=1200,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://itp.nyu.edu/~ye265/pComp/IMG_0507-thumb.JPG" width="160" height="120" alt="" /></a></p>

<p><a style="float: left" href="http://itp.nyu.edu/~ye265/pComp/IMG_0525.html" onclick="window.open('http://itp.nyu.edu/~ye265/pComp/IMG_0525.html','popup','width=1600,height=1200,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://itp.nyu.edu/~ye265/pComp/IMG_0525-thumb.JPG" width="160" height="120" alt="" /></a></p>

<p>I've learned that I'm extremely clumsy w/ the solderng iron. I kept soldering the pins together, or breaking something, or just ruining it. Once THAT was out of the way, the rest of the lab was very straight forward.  We put the LEDs in series and in parallel, and we used a potentiometer to vary the voltage being fed to the LEDs. </p>

<p>One mistake we made is we used a larger resister than the 220 Ohm. So of course nothing was lighting up. But we would measure the voltage across the LED and we got a reading, but no light. We finallly traced it to the resistor.</p>

<p><a style="float: left" href="http://itp.nyu.edu/~ye265/pComp/IMG_0508.html" onclick="window.open('http://itp.nyu.edu/~ye265/pComp/IMG_0508.html','popup','width=1600,height=1200,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://itp.nyu.edu/~ye265/pComp/IMG_0508-thumb.JPG" width="160" height="120" alt="" /></a></p>

<p>Measuring voltage and amperage was simple, once you figured out how to switch b/t the two types of readings on the  multimeter. </p>]]>
        
    </content>
</entry>

</feed> 

