<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8892739</id><updated>2011-12-14T18:56:19.361-08:00</updated><title type='text'>Dimitri Darras Physical Computing ITP</title><subtitle type='html'>First semester NYU ITP Physical Computing Blog, dealing with readings, labs, and group projects.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ddarras.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8892739.post-115531865827041289</id><published>2006-08-11T10:49:00.000-07:00</published><updated>2006-08-11T10:51:16.473-07:00</updated><title type='text'>Final Project</title><content type='html'>&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240" id="pb01" align="middle"&gt;&lt;br /&gt;&lt;param name="allowScriptAccess" value="sameDomain" /&gt;&lt;br /&gt;&lt;param name="movie" value="http://www.dimitridarras.com/pb01.swf" /&gt;&lt;br /&gt;&lt;param name="quality" value="high" /&gt;&lt;br /&gt;&lt;param name="bgcolor" value="#ffffff" /&gt;&lt;br /&gt;&lt;embed src="http://www.dimitridarras.com/pb01.swf" quality="high" bgcolor="#ffffff" width="320" height="240" name="pb01" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /&gt;&lt;br /&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-115531865827041289?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/115531865827041289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/115531865827041289'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2006/08/final-project.html' title='Final Project'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-110307306451552669</id><published>2004-12-14T17:09:00.000-08:00</published><updated>2006-08-17T17:54:17.206-07:00</updated><title type='text'>Documentation</title><content type='html'>Here is the application we filled out for the show, regarding context and purpose of the project:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Description&lt;/I&gt;&lt;br /&gt;&lt;br /&gt;Punching bags are for exercise and stress relief.  This punching bag indicates your progress with solid colors and sounds chosen to refelect intensity of punches.&lt;br /&gt;&lt;br /&gt;We wanted to do something with exercise and a sense of humor.  Initially we thought about baseball and other sports, but focused on boxing because it's something that everyone can do and is familiar with.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Audience&lt;/i&gt;&lt;br /&gt;ITP Students and visitors who want to take out all their frustrations, tech and otherwise. Users can slap at it, punch the hell out it, kick it, etc.   &lt;br /&gt;&lt;i&gt;User Scenario&lt;/i&gt;&lt;br /&gt;Users will approach the piece, and if they choose to hit it, will get an immediate response.   As they punch, they may realize that there is a color-coded system for advancement.   They will also enjoy the spectacle of punching the bag and changing the colors and sounds.     &lt;br /&gt;&lt;br /&gt;&lt;i&gt;Project References, Research and Literature&lt;/i&gt;&lt;br /&gt;Boxers historically get a mixed rap.  While Mohammed Ali is a great of the sport and a timeless winner, Tyson is a more notorious character.    &lt;br /&gt;&lt;br /&gt;Rocky won best film in the 1980's signifying its universal appeal.   Boxing today draws crowds in Vegas and afar, woman now participate too. &lt;br /&gt;&lt;br /&gt;Having tested the interactive punching bag, we received really positive feedback from students in the PComp lounge and Commons Area. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We demonstrated the punching bag Tuesday night for the pcomp projects presentation scheduled in the Japanese Room.&lt;br /&gt;&lt;br /&gt;Here is Wlodek's excellent &lt;a href="http://stage.itp.nyu.edu/%7Ewk372/PhysComp/PComp_Journal/project2.htm"&gt;documentation for the project&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As soon as I can get it off of the two PCs, I'll post here the Illustrator source files and gifs for the graphics.  I think that redundancy for pcomp projects is important considering that machines on occasion crap out.   &lt;br /&gt;&lt;br /&gt;We ended up using neither the crossover nor video in Processing; less is more.&lt;br /&gt;&lt;br /&gt;The class demonstration went very well, Andrew invited 3 guests Alison, Colin, and a film maker to give us unbiased evaluation.   Their main comment was to use the sound trigger more effectively, but otherwise they enjoyed using it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-110307306451552669?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110307306451552669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110307306451552669'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/12/documentation.html' title='Documentation'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-110236719034322482</id><published>2004-12-06T13:04:00.000-08:00</published><updated>2004-12-06T13:06:30.343-08:00</updated><title type='text'>12/3 Working Code - Testing Comments</title><content type='html'>We are getting bad values from the Piezo, possibly because of long wires to the bread board causing interference.&lt;br /&gt;&lt;br /&gt;Here is the latest Processing Code:&lt;br /&gt;&lt;br /&gt;// CODE&lt;br /&gt;// SONIA V2.5 -- Audio Live Stream.&lt;br /&gt;//http://www.pitaru.com/sonia/&lt;br /&gt;//Goal is to capture audio data and parse into if/then&lt;br /&gt;statements //Note the Sonia code folder goes into the&lt;br /&gt;sketch folder&lt;br /&gt;//web site to&lt;br /&gt;scrape:http://www.dhs.gov/dhspublic/display?theme=29&lt;br /&gt;//sounds: http://www.findsounds.com/ISAPI/search.dll&lt;br /&gt;&lt;br /&gt;//Settings for display of color images&lt;br /&gt;int picDislayTime =400;                 //time imageis&lt;br /&gt;displayed in milliseconds&lt;br /&gt;&lt;br /&gt;int numOfPics = 5;                       //number of&lt;br /&gt;images in image array for colors&lt;br /&gt;BImage[] colors = new BImage[numOfPics]; //new array&lt;br /&gt;of up for displaying color photos&lt;br /&gt;int whichImage = 0;                      //to display&lt;br /&gt;appropriate image&lt;br /&gt;boolean showing  = false;                //for&lt;br /&gt;checking whether or not time of the images displayed&lt;br /&gt;has elapsed&lt;br /&gt;int startTime;                           //variable&lt;br /&gt;for timer&lt;br /&gt;float previousLevel = 0;                 //to check&lt;br /&gt;previous mic input&lt;br /&gt;float meterData = 0;&lt;br /&gt;&lt;br /&gt;//settings for display of homepage image&lt;br /&gt;int introDisplayTime  = 30000;           //time after&lt;br /&gt;last sensor input that "homepage" image gets displayed&lt;br /&gt;BImage start;                            //the "home&lt;br /&gt;page" image&lt;br /&gt;int waitingTime;                         //&lt;br /&gt;boolean waiting = false;&lt;br /&gt;&lt;br /&gt;//settings for playing sounds&lt;br /&gt;int numOfSounds  = 5;                       //a sound&lt;br /&gt;for each color&lt;br /&gt;Sample[] thunder = new Sample[numOfSounds]; //array to&lt;br /&gt;hold each sound&lt;br /&gt;&lt;br /&gt;//serial piezo&lt;br /&gt;float piezo = 0;&lt;br /&gt;&lt;br /&gt;float combinedAverageData = 0;&lt;br /&gt;&lt;br /&gt;void setup()&lt;br /&gt;{&lt;br /&gt;  beginSerial();  	  // Default start serial at 9600&lt;br /&gt;baud&lt;br /&gt;  serialWrite(65);        //sent message to pic to&lt;br /&gt;begin serial communication&lt;br /&gt;&lt;br /&gt;  Sonia.start(this);      // Start Sonia engine.&lt;br /&gt;  LiveInput.start(256);   // Start LiveInput and&lt;br /&gt;return 256 FFT frequency bands.&lt;br /&gt;&lt;br /&gt;  size(800,600);&lt;br /&gt;&lt;br /&gt;  for(int j=1 ; j&lt;6 ; j++)&lt;br /&gt;  {&lt;br /&gt;    colors [j-1] = loadImage ("color"  + j + ".gif");&lt;br /&gt;    thunder[j-1] = new Sample("thunder"+ j + ".wav");&lt;br /&gt;  }&lt;br /&gt;  start = loadImage("homepict.gif");&lt;br /&gt;  startTime = millis();&lt;br /&gt;  background (0);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop()&lt;br /&gt;{&lt;br /&gt;  soundShow();      //Show appropriate image based on&lt;br /&gt;input from microphone&lt;br /&gt;&lt;br /&gt;  if (showing)&lt;br /&gt;  {&lt;br /&gt;    image(colors[whichImage], 0, 0);&lt;br /&gt;  }&lt;br /&gt;  if ((millis() - startTime &gt; picDislayTime))&lt;br /&gt;  {&lt;br /&gt;    showing = false;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  intro();          //display homepage image if no&lt;br /&gt;input is received from sensors&lt;br /&gt;}&lt;br /&gt;void soundShow()//Show image based on input from&lt;br /&gt;microphone&lt;br /&gt;{&lt;br /&gt;  meterData = 250 * LiveInput.getLevel(Sonia.LEFT);&lt;br /&gt;  combinedAverageData = (meterData + piezo)/2;&lt;br /&gt;&lt;br /&gt;  for(int i = 100 ; i &gt; 10  ; i-=20)&lt;br /&gt;  {&lt;br /&gt;    int j = i/20;&lt;br /&gt;&lt;br /&gt;    if (!showing)&lt;br /&gt;    {&lt;br /&gt;      if (combinedAverageData &gt; i)&lt;br /&gt;      {&lt;br /&gt;        whichImage = j - 1;       &lt;br /&gt;        thunder[j-1].play();&lt;br /&gt;        showing = true;&lt;br /&gt;        startTime = millis();&lt;br /&gt;        previousLevel = i + 20;&lt;br /&gt;&lt;br /&gt;        println (meterData+ "  " +piezo+ " &lt;br /&gt;"+combinedAverageData);&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void intro()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  if ((combinedAverageData &lt; 10) &amp;&amp; (!waiting))&lt;br /&gt;  {&lt;br /&gt;    waiting = true;&lt;br /&gt;    waitingTime = millis();&lt;br /&gt;  }&lt;br /&gt;  else if (combinedAverageData &gt;= 10) {&lt;br /&gt;    waiting = false;&lt;br /&gt;  }&lt;br /&gt;  if ((millis() - waitingTime &gt; introDisplayTime) &amp;&amp;&lt;br /&gt;(waiting))&lt;br /&gt;  {&lt;br /&gt;    waiting = false;&lt;br /&gt;    image(start, 300, 0);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;void serialEvent()  //automatic serial listener&lt;br /&gt;{&lt;br /&gt;  piezo = serial;     // save messages to variable&lt;br /&gt;"piezo"&lt;br /&gt;  serialWrite(65);    // send message to PIC&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Safely close the sound engine upon Browser&lt;br /&gt;shutdown.&lt;br /&gt;public void stop(){&lt;br /&gt;  Sonia.stop();&lt;br /&gt;  super.stop();&lt;br /&gt;}&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-110236719034322482?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110236719034322482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110236719034322482'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/12/123-working-code-testing-comments.html' title='12/3 Working Code - Testing Comments'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-110183649426879356</id><published>2004-11-30T09:39:00.000-08:00</published><updated>2004-11-30T09:41:34.270-08:00</updated><title type='text'>Processing Code 11/29</title><content type='html'>There is a problem with the .wav and timing of the color changes.  We are wondering if this is a Processing or Sonia issue.  This code uses for loops and arrays to cut down on file size.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;// CODE&lt;br /&gt;// SONIA V2.5 -- Audio Live Stream.&lt;br /&gt;//http://www.pitaru.com/sonia/&lt;br /&gt;//Goal is to capture audio data and parse into if/then statements&lt;br /&gt;//Note the Sonia code folder goes into the sketch folder&lt;br /&gt;&lt;br /&gt;//web site to scrape: http://www.dhs.gov/dhspublic/display?theme=29&lt;br /&gt;//sounds: http://www.findsounds.com/ISAPI/search.dll&lt;br /&gt;&lt;br /&gt;int numOfPics = 5;                       //number of images in image array for colors&lt;br /&gt;BImage[] colors = new BImage[numOfPics]; //new array of up for displaying color photos&lt;br /&gt;int picDislayTime = 100000;                //time image is displayed in milliseconds&lt;br /&gt;&lt;br /&gt;int whichImage = 0;&lt;br /&gt;int startTime;&lt;br /&gt;Sample thunder;&lt;br /&gt;float previousLevel = 0;&lt;br /&gt;boolean showing  = false;&lt;br /&gt;&lt;br /&gt;void setup()&lt;br /&gt;{&lt;br /&gt;  Sonia.start(this);    // Start Sonia engine.&lt;br /&gt;  LiveInput.start(256); // Start LiveInput and return 256 FFT frequency bands.&lt;br /&gt;&lt;br /&gt;  thunder = new Sample("thunder.wav");&lt;br /&gt;&lt;br /&gt;  size(640,480);&lt;br /&gt;  &lt;br /&gt;  for(int j=0 ; j&lt;5  ; j++)&lt;br /&gt;  {&lt;br /&gt;    int m = j+1;&lt;br /&gt;    colors[j] = loadImage("color" + m + ".gif");&lt;br /&gt;  }&lt;br /&gt;  startTime = millis();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  showImage();      //Show appropriate image based on input from microphone&lt;br /&gt;&lt;br /&gt;  for(int i = 5 ; i &gt; 0  ; i-=1)&lt;br /&gt;  {&lt;br /&gt;    int j = i-1;&lt;br /&gt;    if (showing)&lt;br /&gt;&lt;br /&gt;    if (whichImage == i) {&lt;br /&gt;      image(colors[j], 0, 0);&lt;br /&gt;    }    &lt;br /&gt;    if ((millis() - startTime &gt; picDislayTime) || (1500 * LiveInput.getLevel(Sonia.LEFT) &gt; previousLevel))&lt;br /&gt;    /* || (1000 * LiveInput.getLevel(Sonia.LEFT) &lt; previousLevel)*/{&lt;br /&gt;      showing = false;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void showImage()//Show image based on input from microphone&lt;br /&gt;{&lt;br /&gt;  float meterDataLeft = 1500 * LiveInput.getLevel(Sonia.LEFT);//avg this w/ serial in&lt;br /&gt;&lt;br /&gt;  for(int i = 800 ; i &gt; 100  ; i-=160)&lt;br /&gt;  {&lt;br /&gt;    int j = i/160;&lt;br /&gt;&lt;br /&gt;    if (!showing)&lt;br /&gt;    {&lt;br /&gt;      if (meterDataLeft &gt; i)&lt;br /&gt;      {&lt;br /&gt;        whichImage = j;&lt;br /&gt;        println(j);&lt;br /&gt;        thunder.play();&lt;br /&gt;        showing = true;&lt;br /&gt;        startTime = millis();&lt;br /&gt;        previousLevel= meterDataLeft;&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;// Safely close the sound engine upon Browser shutdown.&lt;br /&gt;public void stop(){&lt;br /&gt;  Sonia.stop();&lt;br /&gt;  super.stop();&lt;br /&gt;}&lt;br /&gt;&lt;/PRE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-110183649426879356?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110183649426879356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110183649426879356'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/11/processing-code-1129.html' title='Processing Code 11/29'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-110160655750785217</id><published>2004-11-27T17:48:00.000-08:00</published><updated>2004-11-27T17:49:23.453-08:00</updated><title type='text'>Thanksgiving Processing Code</title><content type='html'>This version has a timer for 10 seconds and stays on a level till the user hits it up to the next or until the 10 seconds are up.  We will have a legend so they know what the colors mean.&lt;br /&gt;&lt;br /&gt;// CODE&lt;br /&gt;// SONIA V2.5 -- Audio Live Stream.&lt;br /&gt;//http://www.pitaru.com/sonia/&lt;br /&gt;//Goal is to capture audio data and parse into if/then statements&lt;br /&gt;//Note the Sonia code folder goes into the sketch folder&lt;br /&gt;&lt;br /&gt;BImage color1;&lt;br /&gt;BImage color2;&lt;br /&gt;BImage color3;&lt;br /&gt;BImage color4;&lt;br /&gt;BImage color5;&lt;br /&gt;&lt;br /&gt;/*int numOfPics = 150; //number of images in image array for video sequence&lt;br /&gt;BImage[] carlos = new BImage[numOfPics]; //new array of up to 224 photos&lt;br /&gt;&lt;br /&gt;int numOfImages = 100; //number of images in image array for background images&lt;br /&gt;BImage[] boxing = new BImage[numOfImages]; //new array of photos*/&lt;br /&gt;&lt;br /&gt;int a = 0; // variable for counting through the display of photos&lt;br /&gt;int picDislayTime = 10000; //time image is displayed in milliseconds&lt;br /&gt;int movDisplayTime = 70; //time image is displayed in milliseconds&lt;br /&gt;&lt;br /&gt;int whichImage = 0;&lt;br /&gt;int startTime;&lt;br /&gt;int startTimeMov;&lt;br /&gt;&lt;br /&gt;float previousLevel = 0;&lt;br /&gt;//float meterLevel = liveinput.getlevel&lt;br /&gt;&lt;br /&gt;boolean showing = false;&lt;br /&gt;boolean slowDown = false;&lt;br /&gt;&lt;br /&gt;void setup(){&lt;br /&gt;&lt;br /&gt;  Sonia.start(this); // Start Sonia engine.&lt;br /&gt;  LiveInput.start(256); // Start LiveInput and return 256 FFT frequency bands.&lt;br /&gt;&lt;br /&gt;  size(640,480);&lt;br /&gt;  colorMode(RGB, 255, 255 ,255, 100);//need this comment later for tinting, etc&lt;br /&gt;&lt;br /&gt;  /*for(int j=0; j&lt;numOfImages; j++) { //count through each of the photos and load them&lt;br /&gt;    int m = j + 1;&lt;br /&gt;    carlos[j] = loadImage("boxing" + m + ".jpg");&lt;br /&gt;  }*/&lt;br /&gt;&lt;br /&gt;  color1 = loadImage("color1.gif");&lt;br /&gt;  color2 = loadImage("color2.gif");&lt;br /&gt;  color3 = loadImage("color3.gif");&lt;br /&gt;  color4 = loadImage("color4.gif");&lt;br /&gt;  color5 = loadImage("color5.gif");&lt;br /&gt;&lt;br /&gt;  /*for(int i=0; i&lt;numOfPics; i++) { //count through each of the photos and load them&lt;br /&gt;    int n = i + 1;&lt;br /&gt;    carlos[i] = loadImage("carlos" + n + ".gif");&lt;br /&gt;  }*/&lt;br /&gt;&lt;br /&gt;  startTime = millis();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;void loop(){&lt;br /&gt;&lt;br /&gt;  background(0,0,0);&lt;br /&gt;  showImage(); //Show appropriate image based on input from microphone&lt;br /&gt;  if (showing) {&lt;br /&gt;    if (whichImage == 5) {&lt;br /&gt;      image(color5, 0, 0);&lt;br /&gt;    }&lt;br /&gt;    else if (whichImage == 4) {&lt;br /&gt;      image(color4,0,0);&lt;br /&gt;    }&lt;br /&gt;    else if (whichImage == 3) {&lt;br /&gt;      image(color3,0,0);&lt;br /&gt;    }&lt;br /&gt;    else if (whichImage == 2) {&lt;br /&gt;      image(color2,0,0);&lt;br /&gt;    }&lt;br /&gt;    else if (whichImage == 1) {&lt;br /&gt;      image(color1,0,0);&lt;br /&gt;    }&lt;br /&gt;    if (millis() - startTime &gt; picDislayTime) {&lt;br /&gt;      showing = false;&lt;br /&gt;    }&lt;br /&gt;   if (1000 * LiveInput.getLevel(Sonia.LEFT) &gt; previousLevel) {&lt;br /&gt;      showing = false;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Safely close the sound engine upon Browser shutdown.&lt;br /&gt;public void stop(){&lt;br /&gt;  Sonia.stop();&lt;br /&gt;  super.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void showImage()//Show appropriate background image based on input from microphone&lt;br /&gt;{&lt;br /&gt;  float meterDataLeft = 1000 * LiveInput.getLevel(Sonia.LEFT);&lt;br /&gt; println(meterDataLeft);&lt;br /&gt;&lt;br /&gt;  if (!showing) {&lt;br /&gt;    if (meterDataLeft &gt; 740)  {&lt;br /&gt;      previousLevel= meterDataLeft;&lt;br /&gt;      whichImage = 5;&lt;br /&gt;      showing = true;&lt;br /&gt;      startTime = millis();&lt;br /&gt;    }&lt;br /&gt;    else if (meterDataLeft &gt; 580) {&lt;br /&gt;      previousLevel= meterDataLeft;&lt;br /&gt;      whichImage = 4;&lt;br /&gt;      showing = true;&lt;br /&gt;      startTime = millis();&lt;br /&gt;    }&lt;br /&gt;    else if (meterDataLeft &gt; 420) {&lt;br /&gt;      previousLevel= meterDataLeft;&lt;br /&gt;      whichImage = 3;&lt;br /&gt;      showing = true;&lt;br /&gt;      startTime = millis();&lt;br /&gt;    }&lt;br /&gt;    else if (meterDataLeft &gt; 260) {&lt;br /&gt;      previousLevel= meterDataLeft;&lt;br /&gt;      whichImage = 2;&lt;br /&gt;      showing = true;&lt;br /&gt;      startTime = millis();&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    else if (meterDataLeft &gt; 100)  {&lt;br /&gt;      whichImage = 1;&lt;br /&gt;      showing = true;&lt;br /&gt;      startTime = millis();&lt;br /&gt;      previousLevel= meterDataLeft;&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-110160655750785217?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110160655750785217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110160655750785217'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/11/thanksgiving-processing-code.html' title='Thanksgiving Processing Code'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-110132806674312408</id><published>2004-11-24T13:26:00.000-08:00</published><updated>2004-11-27T14:43:26.963-08:00</updated><title type='text'>Updated Final Project Code (Processing)</title><content type='html'>We tested the project and received very positive feedback from users.&lt;br /&gt;&lt;br /&gt;To run serial with Sonia at the same time, make sure that win32Comm.dll is in the same folder.&lt;br /&gt;&lt;br /&gt;We are using colors to indicate progress &lt;br /&gt;&lt;img src="http://dimitridarras.com/01green.gif"&gt;&lt;br /&gt;&lt;img src="http://dimitridarras.com/02blue.gif"&gt;&lt;br /&gt;&lt;img src="http://dimitridarras.com/03yellow.gif"&gt;.  &lt;br /&gt;&lt;img src="http://dimitridarras.com/04orange.gif"&gt;.  &lt;br /&gt;&lt;img src="http://dimitridarras.com/05red.gif"&gt;.  .  We need a stepped motion and a timer.  We discussed using the Piezo for serial input for a meter.&lt;br /&gt;&lt;br /&gt;Priorities:&lt;br /&gt;&lt;br /&gt;Set up color program&lt;br /&gt;Set up time delay&lt;br /&gt;Set up audio and serial from strip&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// CODE&lt;br /&gt;// SONIA V2.5 -- Audio Live Stream.&lt;br /&gt;//http://www.pitaru.com/sonia/&lt;br /&gt;//Goal is to capture audio data and parse into if/then statements&lt;br /&gt;//Note the Sonia code folder goes into the sketch folder&lt;br /&gt;&lt;br /&gt;BImage b;&lt;br /&gt;BImage c;&lt;br /&gt;&lt;br /&gt;//int numOfPics = 150; //number of images in image array for video sequence&lt;br /&gt;//BImage[] carlos = new BImage[numOfPics]; //new array of up to 224 photos&lt;br /&gt;&lt;br /&gt;/*int numOfImages = 100; //number of images in image array for background images&lt;br /&gt;BImage[] boxing = new BImage[numOfImages]; //new array of photos*/&lt;br /&gt;&lt;br /&gt;int a = 0; // variable for counting through the display of photos&lt;br /&gt;int picDislayTime = 1000; //time image is displayed in milliseconds&lt;br /&gt;int movDisplayTime = 70; //time image is displayed in milliseconds&lt;br /&gt;&lt;br /&gt;int whichImage = 0;&lt;br /&gt;int startTime;&lt;br /&gt;int startTimeMov;&lt;br /&gt;&lt;br /&gt;boolean showing = false;&lt;br /&gt;boolean slowDown = false;&lt;br /&gt;&lt;br /&gt;void setup(){&lt;br /&gt;&lt;br /&gt;  Sonia.start(this); // Start Sonia engine.&lt;br /&gt;  LiveInput.start(256); // Start LiveInput and return 256 FFT frequency bands.&lt;br /&gt;  beginSerial();&lt;br /&gt;  size(640,480);&lt;br /&gt;  colorMode(RGB, 255, 255 ,255, 100);//need this comment later for tinting, etc&lt;br /&gt;&lt;br /&gt;  /*for(int j=0; j&lt;numOfImages; j++) { //count through each of the photos and load them&lt;br /&gt;    int m = j + 1;&lt;br /&gt;    carlos[j] = loadImage("boxing" + m + ".jpg");&lt;br /&gt;  }*/&lt;br /&gt;&lt;br /&gt;  b = loadImage("boxing1NL.jpg");&lt;br /&gt;  c = loadImage("bsuit.gif");&lt;br /&gt;&lt;br /&gt;  /*for(int i=0; i&lt;numOfPics; i++) { //count through each of the photos and load them&lt;br /&gt;    int n = i + 1;&lt;br /&gt;    carlos[i] = loadImage("carlos" + n + ".gif");&lt;br /&gt;  }*/&lt;br /&gt;&lt;br /&gt;  startTime = millis();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;void loop(){&lt;br /&gt;  background(0,0,0);&lt;br /&gt;  //showImage(); //Show appropriate image based on input from microphone&lt;br /&gt;  if (showing) {&lt;br /&gt;    if (whichImage == 1) {&lt;br /&gt;      image(b, 0, 0);&lt;br /&gt;&lt;br /&gt;    } else if (whichImage == 2) {&lt;br /&gt;      image(c,0,0);&lt;br /&gt;    }&lt;br /&gt;    if (millis() - startTime &gt; picDislayTime) {&lt;br /&gt;      showing = false;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  /*showMeterLevel(); //Show simulated movie clip - acts like a meter based on volume from mic&lt;br /&gt;  if (slowDown) {&lt;br /&gt;    image (carlos[a], 0, 0, carlos[0].width, carlos[0].height - mouseY); //display each image in sequence&lt;br /&gt;    if (millis() - startTimeMov &gt; movDisplayTime){&lt;br /&gt;      slowDown = false;&lt;br /&gt;    }&lt;br /&gt;  }*/&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*void showMeterLevel(){//Show simulated movie clip - acts like a meter based on volume from mic&lt;br /&gt;&lt;br /&gt;  float meterDataLeft = 1000 * LiveInput.getLevel(Sonia.LEFT);&lt;br /&gt;  float meterDataRight = 1000 * LiveInput.getLevel(Sonia.RIGHT);&lt;br /&gt;&lt;br /&gt;  if (!slowDown) {&lt;br /&gt;    image (carlos[a], 0, 0, carlos[0].width, carlos[0].height - mouseY); //display each image in sequence&lt;br /&gt;    a = a + 1;&lt;br /&gt;    if ( a &gt;= numOfPics ) {&lt;br /&gt;      a = 0;&lt;br /&gt;    }&lt;br /&gt;    slowDown = true;&lt;br /&gt;    startTimeMov = millis();&lt;br /&gt;  }&lt;br /&gt;}*/&lt;br /&gt;// Safely close the sound engine upon Browser shutdown.&lt;br /&gt;public void stop(){&lt;br /&gt;  Sonia.stop();&lt;br /&gt;  super.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-110132806674312408?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110132806674312408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110132806674312408'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/11/updated-final-project-code-processing.html' title='Updated Final Project Code (Processing)'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-110046901083790142</id><published>2004-11-14T13:46:00.000-08:00</published><updated>2004-11-14T13:50:10.836-08:00</updated><title type='text'>Bryce Wolkowitz Gallery Visit</title><content type='html'>I went to the "Sign Language" exhibit by Tatsuo Miyajima and Ben Rubin.  Miyajim's pieces centers on numbers in various configurations.  "Counter me on No. 3" is made of neon and steel and reflects the viewer on close inspection.   The 2 Ben Rubin pieces "Instability" were really cool.  I looked for a projector to see how the words reflected on the LED and realized that there's probably something within the tubes which generates these characters.&lt;br /&gt;&lt;br /&gt;Here is the gallery web site:  http://www.brycewolkowitz.com  The building houses other galleries too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-110046901083790142?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110046901083790142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110046901083790142'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/11/bryce-wolkowitz-gallery-visit.html' title='Bryce Wolkowitz Gallery Visit'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-110030432022944845</id><published>2004-11-12T19:00:00.001-08:00</published><updated>2004-11-12T16:05:20.230-08:00</updated><title type='text'>ADC With a BX-24</title><content type='html'>I am using a BX-24 because I am short on PICs and for my processing final, I am using analgue input. &lt;br /&gt;&lt;br /&gt;Here is the schematic from Tom Igoe's site for the BX-24:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://stage.itp.nyu.edu/~tigoe/pcomp/img/bx24reg.jpg"&gt;&lt;br /&gt;&lt;br /&gt;This is the first program I tried on the BX-24:&lt;br /&gt;&lt;br /&gt;dim potVar as integer&lt;br /&gt;&lt;br /&gt;Sub main()&lt;br /&gt;	call delay(0.5)  ' start  program with a half-second delay &lt;br /&gt;&lt;br /&gt;	do&lt;br /&gt;		potVar = getADC(13)&lt;br /&gt;		debug.print "potVar = " ; cstr(potVar)&lt;br /&gt;	loop&lt;br /&gt;&lt;br /&gt;end sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For some reason,the BX-24 returns really clean values from the potentiometer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-110030432022944845?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110030432022944845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110030432022944845'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/11/adc-with-bx-24_110030432022944845.html' title='ADC With a BX-24'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-110003274691961817</id><published>2004-11-09T13:33:00.000-08:00</published><updated>2004-11-10T19:47:50.623-08:00</updated><title type='text'>Lab 7- Motors Lab</title><content type='html'>I wired a &lt;a href="http://stage.itp.nyu.edu/~tigoe/pcomp/bx/index.shtml"&gt;BX-24&lt;/a&gt; and used the following modified code from Tom Igoe's site.  I tested the H-Bridge with the multimeter, but couldn't get a reading of 12V for the motor.&lt;br /&gt;&lt;br /&gt;' H-bridge is connected to pins 11 and 12.&lt;br /&gt;' Switch is connected to pin 20&lt;br /&gt;' motor enable pin is connected to pin 8&lt;br /&gt;&lt;br /&gt;Const switchPin         as      byte = 20&lt;br /&gt;Const motor1Pin         as      byte = 11&lt;br /&gt;Const motor2Pin         as      byte = 12&lt;br /&gt;Const motorEnablePin    as      byte = 8&lt;br /&gt;&lt;br /&gt;Sub main()&lt;br /&gt;        ' initialize  variables:&lt;br /&gt;        call putPin(motor1Pin,1)&lt;br /&gt;        call putPin(motor2Pin,0)&lt;br /&gt;        call getPin(motoeEnablePin, 1)&lt;br /&gt;&lt;br /&gt;        do&lt;br /&gt;                if motorDirection  = 1 then&lt;br /&gt;                        call putPin(motor1Pin,0)&lt;br /&gt;                        call putPin(motor2Pin,1)&lt;br /&gt;                else&lt;br /&gt;                        call putPin(motor1Pin,1)&lt;br /&gt;                        call putPin(motor2Pin,0)&lt;br /&gt;                end if&lt;br /&gt;        loop&lt;br /&gt;end sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As a side note, the BX-24 showed errors after faulty programming.   I tried resetting the RES pin to ground (didn't work) and eventually pulled the chip out of the breadboard for 10 minutes - the light on the chip lit up and it worked again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I was able to get circular motion from a stepper motor. To find which wires (mine were black) to send to power, use an Ohmeter to test resistance across the circuit.  I used trial-and-error for the other four colored wires. This is the order I used:&lt;br /&gt;&lt;br /&gt;Green &lt;br /&gt;Brown &lt;br /&gt;Orange &lt;br /&gt;Yellow&lt;br /&gt;&lt;br /&gt;Igoe's book has the following order:&lt;br /&gt;&lt;br /&gt;Orange&lt;br /&gt;Yellow&lt;br /&gt;Black &lt;br /&gt;Brown&lt;br /&gt;Red&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There has to be a better way to figure where they go, I will try to find out if I update this entry.  &lt;br /&gt;&lt;br /&gt;Also, I still need to use a switch to reverse direction.&lt;br /&gt;&lt;br /&gt;I purchased H-Bridges from Digikey, but ended up using a transistor array from the Computer Store.  Here is the documentation for a &lt;a href="http://rocky.digikey.com/WebLib/Texas%20Instruments/Web%20data/ULQ2003A-Q1.pdf" target="_new"&gt;Darlington Array&lt;/a&gt;.  Here is the PIC basic code I used to get basic motion from the motor:&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;	High PORTB.0&lt;br /&gt;&lt;br /&gt;' set variables:&lt;br /&gt;x VAR BYTE&lt;br /&gt;steps VAR WORD &lt;br /&gt;stepArray VAR BYTE(4)&lt;br /&gt;clear&lt;br /&gt;&lt;br /&gt;TRISD = %11110000&lt;br /&gt;PORTD = 255&lt;br /&gt;input portb.4&lt;br /&gt;Pause 1000&lt;br /&gt;&lt;br /&gt;stepArray[0] = %00001010&lt;br /&gt;stepArray[1] = %00000110&lt;br /&gt;stepArray[2] =%00000101&lt;br /&gt;stepArray[3] = %00001001&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;main:&lt;br /&gt;    if portb.4 = 1 then&lt;br /&gt;        steps = steps + 1&lt;br /&gt;    else&lt;br /&gt;        steps = steps - 1&lt;br /&gt;    endif&lt;br /&gt;    &lt;br /&gt;    portD = stepArray[steps //4] &lt;br /&gt;    pause 2&lt;br /&gt;     &lt;br /&gt;GoTo main &lt;br&gt;&lt;br&gt;&lt;br /&gt;Here are two somewhat out-of-focus photos of the breadboard and motors:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.dimitridarras.com/motor01.jpg"&gt;&lt;br /&gt;&lt;img src="http://www.dimitridarras.com/motor02.jpg"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-110003274691961817?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110003274691961817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/110003274691961817'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/11/lab-7-motors-lab.html' title='Lab 7- Motors Lab'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-109962292433937635</id><published>2004-11-04T18:46:00.000-08:00</published><updated>2004-11-24T20:37:42.940-08:00</updated><title type='text'>Interactive Punching Bag Documentation</title><content type='html'>This is the &lt;a href="http://homepages.nyu.edu/~dd263/pb2.htm"&gt;short description&lt;/a&gt; of the project to go where we set it up&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the &lt;a href="http://stage.itp.nyu.edu/~dd263/pcomp/pbag/"&gt;initial proposal&lt;/a&gt; and &lt;a href="http://stage.itp.nyu.edu/%7Ewk372/PhysComp/PComp_Journal/project2.htm"&gt;Wlodek's current documentation&lt;/a&gt; for the project&lt;br /&gt;&lt;br /&gt;PROCESSING CODE&lt;br /&gt;&lt;br /&gt;// CODE&lt;br /&gt;// SONIA V2.5 -- Audio Live Stream.&lt;br /&gt;//http://www.pitaru.com/sonia/&lt;br /&gt;//Goal is to capture audio data and parse into if/then statements&lt;br /&gt;//Note the Sonia code folder goes into the sketch folder&lt;br /&gt;&lt;br /&gt;BImage b;&lt;br /&gt;BImage c;&lt;br /&gt;&lt;br /&gt;int numOfPics  = 150; //number of images in image array for video sequence&lt;br /&gt;BImage[] carlos = new BImage[numOfPics]; //new array of up to 224 photos&lt;br /&gt;&lt;br /&gt;/*int numOfImages  = 100; //number of images in image array for background images&lt;br /&gt;BImage[] boxing = new BImage[numOfImages]; //new array of photos*/&lt;br /&gt;&lt;br /&gt;int a = 0;            // variable for counting through the display of photos&lt;br /&gt;int picDislayTime = 1000;  //time image is displayed in milliseconds&lt;br /&gt;int movDisplayTime = 30; //time image is displayed in milliseconds&lt;br /&gt;&lt;br /&gt;int whichImage = 0;&lt;br /&gt;int startTime;&lt;br /&gt;int startTimeMov;&lt;br /&gt;&lt;br /&gt;boolean showing  = false;&lt;br /&gt;boolean slowDown = false;&lt;br /&gt;&lt;br /&gt;void setup(){&lt;br /&gt;&lt;br /&gt;  Sonia.start(this); // Start Sonia engine.&lt;br /&gt;  LiveInput.start(256); // Start LiveInput and return 256 FFT frequency bands.&lt;br /&gt;&lt;br /&gt;  size(640,480);&lt;br /&gt;  colorMode(RGB, 255, 255 ,255, 100);//need this comment later for tinting, etc&lt;br /&gt;&lt;br /&gt;  /*for(int j=0; j&lt;numOfImages; j++) { //count through each of the photos and load them&lt;br /&gt;    int m = j + 1;&lt;br /&gt;    carlos[j] = loadImage("boxing"  + m +  ".jpg");&lt;br /&gt;  }*/&lt;br /&gt;&lt;br /&gt;  b = loadImage("boxing1NL.jpg");&lt;br /&gt;  c = loadImage("bsuit.gif");&lt;br /&gt;&lt;br /&gt;  for(int i=0; i&lt;numOfPics; i++) { //count through each of the photos and load them&lt;br /&gt;    int n = i + 1;&lt;br /&gt;    carlos[i] = loadImage("carlos"  + n +  ".gif");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  startTime = millis();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;void loop(){&lt;br /&gt;  background(0,0,0);&lt;br /&gt;  showImage(); //Show appropriate image based on input from microphone&lt;br /&gt;  if (showing) {&lt;br /&gt;    if (whichImage == 1) {&lt;br /&gt;      image(b, 0, 0);&lt;br /&gt;&lt;br /&gt;    } else if (whichImage == 2) {&lt;br /&gt;      image(c,0,0);&lt;br /&gt;    }&lt;br /&gt;    if (millis() - startTime &gt; picDislayTime) {&lt;br /&gt;      showing = false;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  showMeterLevel(); //Show simulated movie clip - acts like a meter based on volume from mic&lt;br /&gt;  if (slowDown) {&lt;br /&gt;    image (carlos[a], 0, 0, carlos[0].width, carlos[0].height - mouseY);   //display each image in sequence&lt;br /&gt;    if (millis() - startTimeMov &gt; movDisplayTime){&lt;br /&gt;      slowDown = false;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void showMeterLevel(){//Show simulated movie clip - acts like a meter based on volume from mic&lt;br /&gt;&lt;br /&gt;  float meterDataLeft  = 1000 * LiveInput.getLevel(Sonia.LEFT);&lt;br /&gt;  float meterDataRight = 1000 * LiveInput.getLevel(Sonia.RIGHT);&lt;br /&gt;&lt;br /&gt;  if (!slowDown) {&lt;br /&gt;    image (carlos[a], 0, 0, carlos[0].width, carlos[0].height - mouseY);   //display each image in sequence&lt;br /&gt;    a = a + 1;&lt;br /&gt;    if ( a &gt;= numOfPics ) {&lt;br /&gt;      a = 0;&lt;br /&gt;    }&lt;br /&gt;    slowDown = true;&lt;br /&gt;    startTimeMov = millis();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;// Safely close the sound engine upon Browser shutdown.&lt;br /&gt;public void stop(){&lt;br /&gt;  Sonia.stop();&lt;br /&gt;  super.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void showImage()//Show appropriate background image based on input from microphone&lt;br /&gt;{&lt;br /&gt;  float meterDataLeft  = 1000 * LiveInput.getLevel(Sonia.LEFT);&lt;br /&gt;  float meterDataRight = 1000 * LiveInput.getLevel(Sonia.RIGHT);&lt;br /&gt;  println(startTimeMov);&lt;br /&gt;&lt;br /&gt;  if (!showing) {&lt;br /&gt;    if (meterDataLeft &gt; 500) {&lt;br /&gt;      whichImage = 1;&lt;br /&gt;      showing = true;&lt;br /&gt;      startTime = millis();&lt;br /&gt;    }  else if (meterDataLeft &gt; 200){&lt;br /&gt;      whichImage = 2;&lt;br /&gt;      showing = true;&lt;br /&gt;      startTime = millis();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-109962292433937635?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109962292433937635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109962292433937635'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/11/interactive-punching-bag-documentation.html' title='Interactive Punching Bag Documentation'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-109951861535328727</id><published>2004-11-03T13:44:00.000-08:00</published><updated>2004-11-24T20:37:05.256-08:00</updated><title type='text'>Interactive Punching Bag Project  - Presentation III</title><content type='html'>Tonight we present for class.  The following hardware is in place:&lt;br /&gt;&lt;br /&gt;Wlodek's Crossover for low frequency microphone input&lt;br /&gt;My mic inside the punching bag&lt;br /&gt;Piezo strip motion sensor sewed to the punching bag&lt;br /&gt;PIC chip and bread board with diode array&lt;br /&gt;MIDI synthesizer&lt;br /&gt;MIDI and audio cables&lt;br /&gt;Amplifier &lt;br /&gt;Speaker&lt;br /&gt;&lt;br /&gt;The PIC BASIC PRO code for the PIC is as follows&lt;br /&gt;&lt;br /&gt;'****************************************************************&lt;br /&gt;'* Name : week7 MIDI with 1 pot *&lt;br /&gt;'* Author : wk372 * &lt;br /&gt;'* Date : 10/23/2004 *&lt;br /&gt;'****************************************************************&lt;br /&gt;' open the file with the definitions that we need:&lt;br /&gt;INCLUDE "modedefs.bas"&lt;br /&gt;&lt;br /&gt;DEFINE OSC 20&lt;br /&gt;Define ADC_BITS 10 ' Set number of bits in result&lt;br /&gt;DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)&lt;br /&gt;Define ADC_SAMPLEUS 15 ' Set sampling time in uS&lt;br /&gt;&lt;br /&gt;'set up serial UART registers:&lt;br /&gt;DEFINE HSER_RCSTA 90h ' enable the receive register&lt;br /&gt;DEFINE HSER_TXSTA 20h ' enable the transmit register&lt;br /&gt;DEFINE HSER_BAUD 31250 ' set the baud rate&lt;br /&gt;&lt;br /&gt;TRISA = %11111111 'set PORTA to all input&lt;br /&gt;&lt;br /&gt;'setup ADCON1&lt;br /&gt;ADCON1= %10000010&lt;br /&gt;&lt;br /&gt;'declare an aarray of 12 word variables&lt;br /&gt;pitch var byte(12)&lt;br /&gt;&lt;br /&gt;'declare other variables&lt;br /&gt;note var byte&lt;br /&gt;ADCVar var word&lt;br /&gt;&lt;br /&gt;'the 12 elements of the array called pitch are the 12 notes of a scale&lt;br /&gt;pitch (0) =60 ' middle c&lt;br /&gt;pitch (1) =61 ' C#&lt;br /&gt;pitch (2) =62 ' D&lt;br /&gt;pitch (3) =63 ' D#&lt;br /&gt;pitch (4) =64 ' E&lt;br /&gt;pitch (5) =65 ' F&lt;br /&gt;pitch (6) =66 ' F#&lt;br /&gt;pitch (7) =63 ' G&lt;br /&gt;pitch (8) =68 ' G#&lt;br /&gt;pitch (9) =69 ' A&lt;br /&gt;pitch (10) =70 ' A#&lt;br /&gt;pitch (11) =71 ' B &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;main&lt;br /&gt;'mypot gave a value of 0 to 1023&lt;br /&gt;ADCin 0, ADCVar&lt;br /&gt;'convert to a range from o to 10&lt;br /&gt;Note = ADCVar / 100&lt;br /&gt;&lt;br /&gt;if ADCVar&gt;600 then&lt;br /&gt;'play note&lt;br /&gt;hserout [$90, pitch(note),$40]&lt;br /&gt;pause 250&lt;br /&gt;'noteoff:&lt;br /&gt;hserout[$80, pitch(note), $00]&lt;br /&gt;&lt;br /&gt;endif&lt;br /&gt;&lt;br /&gt;goto main&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-109951861535328727?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109951861535328727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109951861535328727'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/11/interactive-punching-bag-project.html' title='Interactive Punching Bag Project  - Presentation III'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-109953971520909156</id><published>2004-10-20T19:37:00.000-07:00</published><updated>2004-11-09T18:22:27.086-08:00</updated><title type='text'>Lab 6 0.20.04 - MIDI</title><content type='html'>IDI output requires a PIC program stating which note to repeat on the synthesizer. I used the basic circuit from the lab.&lt;br /&gt;&lt;br /&gt;DEFINE OSC 20&lt;br /&gt;DEFINE HSER_RCSTA 90h ' enable the receive register&lt;br /&gt;DEFINE HSER_TXSTA 20h  ' enable the transmit register&lt;br /&gt;DEFINE HSER_BAUD 31250 ' set the baud rate&lt;br /&gt;&lt;br /&gt;main:&lt;br /&gt;    ' noteon channel 1, middle A, middle velocity&lt;br /&gt;    hserout [$90, $45,$40] &lt;br /&gt;    pause 1000&lt;br /&gt;&lt;br /&gt;   ' noteoff channel 1, middle A&lt;br /&gt;   hserout [$80, $45, $00] &lt;br /&gt;goto main&lt;br /&gt;&lt;br /&gt;IDI output requires a PIC program stating which note to repeat on the synthesizer. I used the basic circuit from the lab.&lt;br /&gt;&lt;br /&gt;DEFINE OSC 20&lt;br /&gt;DEFINE HSER_RCSTA 90h ' enable the receive register&lt;br /&gt;DEFINE HSER_TXSTA 20h  ' enable the transmit register&lt;br /&gt;DEFINE HSER_BAUD 31250 ' set the baud rate&lt;br /&gt;&lt;br /&gt;main:&lt;br /&gt;    ' noteon channel 1, middle A, middle velocity&lt;br /&gt;    hserout [$90, $45,$40] &lt;br /&gt;    pause 1000&lt;br /&gt;&lt;br /&gt;   ' noteoff channel 1, middle A&lt;br /&gt;   hserout [$80, $45, $00] &lt;br /&gt;goto main&lt;br /&gt;&lt;br /&gt;IDI output requires a PIC program stating which note to repeat on the synthesizer. I used the basic circuit from the lab.&lt;br /&gt;&lt;br /&gt;DEFINE OSC 20&lt;br /&gt;DEFINE HSER_RCSTA 90h ' enable the receive register&lt;br /&gt;DEFINE HSER_TXSTA 20h  ' enable the transmit register&lt;br /&gt;DEFINE HSER_BAUD 31250 ' set the baud rate&lt;br /&gt;&lt;br /&gt;main:&lt;br /&gt;    ' noteon channel 1, middle A, middle velocity&lt;br /&gt;    hserout [$90, $45,$40] &lt;br /&gt;    pause 1000&lt;br /&gt;&lt;br /&gt;   ' noteoff channel 1, middle A&lt;br /&gt;   hserout [$80, $45, $00] &lt;br /&gt;goto main&lt;br /&gt;&lt;br /&gt;Note the 20 Mhz clock on the chip - this is required for MIDI.  Another very important fact for PIC BASIC PRO - set the oscillator to HS (High Speed), otherwise the MIDI won't work.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://stage.itp.nyu.edu/~dd263/pcomp/MIDI.jpg"&gt;&lt;br /&gt;&lt;br /&gt;This is the sythesizer I used - it worked after a couple of tries.   The knob on the right sets the instrument.   To test the synthesizer, press the tone button on the pad to get a tone.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://stage.itp.nyu.edu/~dd263/pcomp/synth.jpg"&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-109953971520909156?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109953971520909156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109953971520909156'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/10/lab-6-02004-midi.html' title='Lab 6 0.20.04 - MIDI'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-109953933557735040</id><published>2004-10-20T19:32:00.000-07:00</published><updated>2004-11-12T14:40:09.516-08:00</updated><title type='text'>Lab 5 10.20.04 - Analogue Input through to Serial Processing </title><content type='html'>Norretranders, User Illusion, ch. 6, "The Bandwidth of Consciousness" deals with human brain cell capacity to process information from the outside world. I'm unclear on the point of this reading but I get the sense that it's part scientific, part qualitative. The argument goes that we cannot possibly register everything in our sensory environment so the brain has to decipher messages in a complex fashion. &lt;br /&gt;&lt;br /&gt;Here is a connector schematic from Tom Igoe's site to solder a serial connection.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://stage.itp.nyu.edu/~tigoe/pcomp/img/ser-connector-schematic.jpg"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For the lab assignment, I hooked up 2 potentiometers to a PIC, using the BASIC program from the serial lab. Here is the processing code to vary amplitude of the sine waves:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* Serial call-and-response&lt;br /&gt;by Tom Igoe (with adjustments by Dan)&lt;br /&gt;&lt;br /&gt;Sends a byte out the serial port, and reads 3 bytes in.&lt;br /&gt;sets background color, x location and rotation of a rect&lt;br /&gt;&lt;br /&gt;Updated October 12, 2004&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;int bkcolor;                         // background color&lt;br /&gt;int[] serialStuff = new int[3];    // where we'll put what we receive&lt;br /&gt;int serialCount = 0;                 // a count of how many bytes we receive&lt;br /&gt;int xpos;                            // x location of rectangle&lt;br /&gt;int rot;                             // rotation of rectangle&lt;br /&gt;//BFont font;&lt;br /&gt; &lt;br /&gt;void setup() {&lt;br /&gt;  //begin serial communication&lt;br /&gt;  beginSerial();&lt;br /&gt;  size(640, 240);&lt;br /&gt; // font = loadFont("Garamond-Bold.vlw.gz");&lt;br /&gt;&lt;br /&gt;  //start off our call and response by sending 65;&lt;br /&gt;  serialWrite(65);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop() {&lt;br /&gt;  println(xpos);&lt;br /&gt;  //draw background with red value from sensor&lt;br /&gt;  background(bkcolor,bkcolor,bkcolor);&lt;br /&gt;  //textFont(font, 44);&lt;br /&gt; float xoff = 0.0; &lt;br /&gt;&lt;br /&gt;    background(153,51,0); &lt;br /&gt;    stroke(255,255,255);&lt;br /&gt;    xoff = xoff + .25; &lt;br /&gt;    float n = noise(xoff) * 1000; &lt;br /&gt;    float a = 60.0; &lt;br /&gt;    float inc = TWO_PI/18.0;&lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;    for(int i=0; i&lt;900; i=i+10)&lt;br /&gt;      { &lt;br /&gt;        line(i+400, bkcolor, i, +noise(xoff)*sin(a)*xpos); &lt;br /&gt;      // line(i+400, random(int(height)), i+400, +noise(xoff)*sin(a)*800.0); &lt;br /&gt;        a = a + inc/5; &lt;br /&gt;      }  &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void serialEvent() {&lt;br /&gt;   // add the latest byte from the serial port to array:&lt;br /&gt;  serialStuff[serialCount] = serial;&lt;br /&gt;  serialCount++;&lt;br /&gt;&lt;br /&gt;  // if we have 3 things set our variables:&lt;br /&gt;  if (serialCount &gt; 2 ) {&lt;br /&gt;    bkcolor = serialStuff[0];&lt;br /&gt;    xpos = serialStuff[1];&lt;br /&gt;    rot = serialStuff[2];&lt;br /&gt;    // clear the string when we're done, and ask for more:&lt;br /&gt;    serialCount = 0;&lt;br /&gt;    // send a capital A to request new sensor readings:&lt;br /&gt;    serialWrite(65);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Here is the PIC code from Wlodek's Journal for Serial Output:&lt;br /&gt;&lt;br /&gt;PIC CODE&lt;br /&gt;&lt;br /&gt;'****************************************************************&lt;br /&gt;'* Author : wk372 *&lt;br /&gt;'* Date : 10/20/2004 * &lt;br /&gt;'****************************************************************&lt;br /&gt;&lt;br /&gt;txPin var portc.6&lt;br /&gt;rxPin var portc.7 &lt;br /&gt;grLed var portd.0&lt;br /&gt;ylLed Var portd.1&lt;br /&gt;&lt;br /&gt;output grled&lt;br /&gt;output ylLed&lt;br /&gt;output txpin&lt;br /&gt;input rxpin&lt;br /&gt;&lt;br /&gt;inputVar VAR byte&lt;br /&gt;pot1 VAR WORD ' Create variable to store result pot1&lt;br /&gt;pot2 VAR WORD ' Create variable to store result pot2&lt;br /&gt;&lt;br /&gt;' POTENTIOMETER SETUP&lt;br /&gt;' Define ADCIN parameters&lt;br /&gt;DEFINE ADC_BITS 10 ' Set number of bits in result&lt;br /&gt;DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)&lt;br /&gt;DEFINE ADC_SAMPLEUS 10 ' Set sampling time in uS&lt;br /&gt;&lt;br /&gt;TRISA = %11111111 ' Set PORTA to all input&lt;br /&gt;ADCON1 = %10000010 ' Set PORTA analog and right justify result&lt;br /&gt;&lt;br /&gt;'light green LED to know program is working&lt;br /&gt;&lt;br /&gt;high grled&lt;br /&gt;pause 300&lt;br /&gt;low grled&lt;br /&gt;pause 150&lt;br /&gt;high grled &lt;br /&gt;&lt;br /&gt;PAUSE 500 ' Wait .5 second&lt;br /&gt;&lt;br /&gt;'-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;main:&lt;br /&gt;&lt;br /&gt;'Yellow LED to know program is running&lt;br /&gt;&lt;br /&gt;low ylled&lt;br /&gt;&lt;br /&gt;ADCIN 0, pot1 'potentiometer1 variable&lt;br /&gt;ADCIN 1, pot2 'potentiometer2 variable&lt;br /&gt;pot1 = pot1/4 'divide the value because it's too big&lt;br /&gt;pot2 = pot2/4 'divide the value because it's too big&lt;br /&gt;&lt;br /&gt;'----------------------&lt;br /&gt;' THE LISTENING CODE - puts message into inputVar&lt;br /&gt;serin2 rxpin, 16468, [inputVar] 'listening for processing signal&lt;br /&gt;&lt;br /&gt;high ylled&lt;br /&gt;&lt;br /&gt;if inputVar=65 then ' if received message is 65, then respond to processing&lt;br /&gt;&lt;br /&gt;serout2 txpin, 16468, [pot1,pot2] 'talk to processing&lt;br /&gt;&lt;br /&gt;ENDif&lt;br /&gt;&lt;br /&gt;goto main&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Processing accepts serial data from the PIC, so I used a program with a Sine function and varied the function parameters according to input from the potentiometers. &lt;br /&gt;&lt;br /&gt;As a side note, I am working with Wlodek to parse sound data from the Sonia plug-in into Processing. &lt;br /&gt;&lt;br /&gt;For the Lab assignment, Java-based processing receives serial input from the PIC. Here is a photo of two potentiometers controlling a Processing assignment. &lt;br /&gt;&lt;br /&gt;&lt;img src="http://stage.itp.nyu.edu/~dd263/pcomp/2pots.jpg"&gt;&lt;br /&gt;&lt;br /&gt;The two potentiometers control extremities on a Sine curve. &lt;br /&gt;&lt;br /&gt;Here is a photo of the output to Processing&lt;br /&gt;&lt;br /&gt;&lt;img src="http://stage.itp.nyu.edu/~dd263/pcomp/processing.jpg"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-109953933557735040?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109953933557735040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109953933557735040'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/10/lab-5-102004-analogue-input-through-to.html' title='Lab 5 10.20.04 - Analogue Input through to Serial Processing '/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-109953907991858614</id><published>2004-10-13T19:30:00.000-07:00</published><updated>2004-11-03T19:50:00.866-08:00</updated><title type='text'>Lab 4 0.13.04  Documentation and Reading</title><content type='html'>Donald A. Norman's "The Psychopathology of Everyday Things" addresses the issue of bad design and how to improve it. Although some of the examples are dated, the points made are still valid. I still haven't figured out how to open the pcomp Shop door. The picture of "Carelman's Coffeepot for Masochists" is cool. We've all seen sadistic products before: "surround sound" amplifier buttons, trojan horse shareware which doesn't work, etc. &lt;br /&gt;&lt;br /&gt;Norman says an important consideration is visibility and natural, i.e. intuitive design. He states that "when simple things need pictures, labels, or instructions, the design has failed." I couldn't agree more. Normal also states that designers need to consider the user's psychology. In conclusion, he states that clever design can help reduce complexity in (technological) products. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-109953907991858614?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109953907991858614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109953907991858614'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/10/lab-4-01304-documentation-and-reading.html' title='Lab 4 0.13.04  Documentation and Reading'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-109953897098259650</id><published>2004-10-06T19:27:00.000-07:00</published><updated>2004-11-04T19:02:28.163-08:00</updated><title type='text'>Lab 3 10.06.04 - Analogue Output</title><content type='html'>Group Project with Chia Hao, please use &lt;a href="http://stage.itp.nyu.edu/~dd263/pcomp/weathervane/"&gt;this link&lt;/a&gt; for a full description of the Weathervane.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://stage.itp.nyu.edu/~dd263/pcomp/1.jpg"&gt;&lt;br /&gt;&lt;br /&gt;The reading was "Chapter One: What exactly is interactivity" by Chris Crawford. Crawford makes the case for interactivity and defines what it as a conversation. Crawford writes that you need two actors for interaction - these actors think, listen, and speak. Crawford defines activities such as reading as not interactive. He is heavy handed in his conclusion because linear art forms like books and movies can be the genesis of interactivity and discussion. Crawford cites an example from Greek antiquity to support his claim that the spoken word is better than the written. The conclusion addresses "web" generation and interaction designers and draws the distinction between UI designers and human factors.&lt;br /&gt;&lt;br /&gt;The lab assignment was to hook up output to a servo motor. I still need to try audio output with a potentiometer. The main difficulty with the servo motor was ensuring that connections were solid on the Radio Shack breadboard and the servo wires which are really thin.&lt;br /&gt;&lt;br /&gt;Here is the code to turn the servo to it's maximum position and start again:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;        pulseWidth var byte&lt;br /&gt;        ' set up constants with the minimum and maximum pulsewidths&lt;br /&gt;        minPulse CON 50&lt;br /&gt;        maxPulse CON 250&lt;br /&gt;        ' set up a constant with the time between pulses:&lt;br /&gt;        refreshPeriod CON 20&lt;br /&gt;&lt;br /&gt;        ' set an initial pulsewidth:&lt;br /&gt;        pulseWidth = minPulse&lt;br /&gt;&lt;br /&gt;main:&lt;br /&gt;        'take the output pin low so we can pulse it high&lt;br /&gt;        Low PORTC.3&lt;br /&gt;        ' pulse the pin&lt;br /&gt;        PulsOut PORTC.3, pulseWidth&lt;br /&gt;        ' pause for as long as needed:&lt;br /&gt;        Pause refreshPeriod&lt;br /&gt;&lt;br /&gt;        ' change the angle for the next time around:&lt;br /&gt;        IF pulseWidth &gt; maxPulse Then&lt;br /&gt;                pulseWidth = minPulse&lt;br /&gt;        Else&lt;br /&gt;                pulseWidth = pulseWidth + 1&lt;br /&gt;        Endif&lt;br /&gt;&lt;br /&gt;GoTo main&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-109953897098259650?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109953897098259650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109953897098259650'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/10/lab-3-100604-analogue-output.html' title='Lab 3 10.06.04 - Analogue Output'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-109952486523216481</id><published>2004-09-29T15:31:00.000-07:00</published><updated>2004-12-05T12:04:12.603-08:00</updated><title type='text'>Lab 2 9.29.04 - Programming the PIC</title><content type='html'>Pic programming requires multiple steps and a lot of patience. The PICBASIC compiler has a menu item under view called Serial Connection which is important for ensuring serial connectivity and serial communication.&lt;br /&gt;&lt;br /&gt;I was able to hook up a potentiometer but it started to fry because of faulty wiring. In short, you place one end at ground, another at  power, then place the middle wire to the PIC pin.&lt;br /&gt;&lt;br /&gt;My first PIC has a broken pin, so I learned to use either a small screwdriver or PIC tweezer to remove the second chip carefully. During this lab, my power source was inconsistent due to poor wire connections.&lt;br /&gt;&lt;br /&gt;The results from the potentiometer show up in the Serial Communication window and vary according to analogue input. &lt;br /&gt;&lt;img src="http://stage.itp.nyu.edu/~dd263/pcomp/pic_programmer.gif"&gt;&lt;br /&gt;his is the PIC PROGRAMMER which you can check out from the equipment room. I rebooted to ensure serial connection. The LEDs are not a good indicator of power. I may look into getting a mac USB to serial connector to program a BX-24.&lt;br /&gt;&lt;br /&gt;NOTE:  a couple of PIC trouble shooting pointers&lt;br /&gt;&lt;br /&gt;-Make sure the PIC pins are all touching the bread board&lt;br /&gt;-When you place the PIC in the PIC Programmer, the little circle lines up with the lever in the PIC Programmer&lt;br /&gt;-If your pin breaks or is bent, use the pliers to gently push the pins into place or solder a broken pin with a header.&lt;br /&gt;-Unless you've removed the 5V regulator, it's unlikely that you've fried your PIC, try trouble shooting other areas.&lt;br /&gt;-Be very carefull when you lift the PIC from the breadboard - use a PIC pliers or maybe a screwdriver.&lt;br /&gt;&lt;br /&gt;Here are screenshots from PIC BASIC PRO.  Finiding the icons isn't always clear:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.dimitridarras.com/pcomp/PICBASIC01.gif"&gt;&lt;br /&gt;This is the second part of the chip programming. &lt;br /&gt;&lt;img src="http://www.dimitridarras.com/pcomp/PICBASIC02.gif"&gt;&lt;br /&gt;&lt;br /&gt; Again, make sure the right PIC is selected.  If you get an "Error 100", there is something wrong with the connection, either serial or PIC.  For instance, I have to push down on a PIC with a broken pin to get rid of the "Error 100".&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-109952486523216481?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109952486523216481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109952486523216481'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/09/lab-2-92904-programming-pic_29.html' title='Lab 2 9.29.04 - Programming the PIC'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8892739.post-109952463080714255</id><published>2004-09-12T15:28:00.000-07:00</published><updated>2004-11-12T15:14:11.910-08:00</updated><title type='text'>Lab 1 9.12.04 - Turning on an LED on a bread board</title><content type='html'>he reading, "Less is More.." by William Buxton (2001), makes some thought provoking comments regarding "Renaissance teams". The guiding model is to aggregate specialists since the scope of emerging technology is too overwhelming for the individual.&lt;br /&gt;&lt;br /&gt;The article cites numerous sources to back up arguments, however, falls short of addressing economic needs versus user-based design. Maybe it's cheaper to continue with the mouse-monitor paradigm. On the upshot, there will be an economically viable alternative using physical space if it doesn't already exist.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With the help of generous students, I was able to power my LED. The main challenge with soldering is positioning the liquid metal in the right spot. I had to re-solder the switch connection. &lt;br /&gt;&lt;br /&gt;I used a Radio Shack bread board which differs from the example in the electricity flow is horizontal instead of vertical&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This week, I rewired the breadboard from Radio Shack to Jameco. The most important factors include wiring from ground to ground and power to power on each column. I spent a long time debugging a circuit only to find that the power regulator was facing on the wrong direction. &lt;br /&gt;&lt;br /&gt;The resistors only power down for a particular row if you plug in an LED on another row, it will receive the full 5V. &lt;br /&gt;&lt;br /&gt;I was able to power a flashlight bulb (5V) and got some movement from a motor by soldering onto the bulb exterior and motor connectors respectively. &lt;br /&gt;&lt;br /&gt;Based on reading in the Igoe book, my soldering technique has improved since I heat up under the element and let the solder drip onto the wire from the top. &lt;br /&gt;&lt;br /&gt;Additional Regulator Notes:&lt;br /&gt;&lt;br /&gt;You have to press down hard to make a connection with the bread board, but not so hard that you bend the pins.&lt;br /&gt;&lt;br /&gt;My regulator burned my finger.  Turns out this is not supposed to happen.  Read about it &lt;a href="http://stage.itp.tsoa.nyu.edu/physcomp/blog/archives/000477.php"&gt;here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8892739-109952463080714255?l=ddarras.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109952463080714255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8892739/posts/default/109952463080714255'/><link rel='alternate' type='text/html' href='http://ddarras.blogspot.com/2004/09/lab-1-91204-turning-on-led-on-bread.html' title='Lab 1 9.12.04 - Turning on an LED on a bread board'/><author><name>Dimitri Darras</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_v1AJNCbrXwA/Si1jUQsqY4I/AAAAAAAAAAQ/Dqp2WfWWdys/S220/dd.jpg'/></author></entry></feed>
