<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jelani John : One Stop Shop &#187; Technology</title>
	<atom:link href="http://jelanijohn.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://jelanijohn.com</link>
	<description>For all things Jelani.</description>
	<lastBuildDate>Thu, 22 Dec 2011 09:43:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Train Stop Project</title>
		<link>http://jelanijohn.com/2008/12/10/train-stop-project/</link>
		<comments>http://jelanijohn.com/2008/12/10/train-stop-project/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 07:27:37 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=342</guid>
		<description><![CDATA[What? I worked on this project with Tim Haynes. The goal of this project was to build a device that lets you know when your train stop is coming up. Look! It all started with the thought that when you&#8217;re coming home late, and you&#8217;re tired or drunk or both, you can sometimes miss your [...]]]></description>
			<content:encoded><![CDATA[<h3>What?</h3>
<p>I worked on this project with <a href="http://itp.nyu.edu/blogs/th913">Tim Haynes</a>.</p>
<p>The goal of this project was to build a device that lets you know when your train stop is coming up.</p>
<h3>Look!</h3>
<p>It all started with the thought that when you&#8217;re coming home late, and you&#8217;re tired or drunk or both, you can sometimes miss your trainstop. Or if you&#8217;re reading a good book or watching a movie or even just having a nap. So, what if you had a device that could A) alert you that your stop was coming up and B) let you know that your stop was here.</p>
<p><embed src="http://blip.tv/play/Ad_PJQA" type="application/x-shockwave-flash" width="560" height="480" allowscriptaccess="always" allowfullscreen="true"></embed><br />
<span id="more-342"></span></p>
<h3>How?</h3>
<p> Enter&#8230; <b>The Device</b> <br \> Right now it&#8217;s a simple box with very basic inputs and outputs.</p>
<ul>
<li> You turn on the Device. By default, its set to two train stops, because why would you need something like this for only one stop?</li>
<li> You increment the number of stops by pushing a red on the side. This is also useful in the case of false stop detection.
<li>
<li> When you reach the stop before your stop, a yellow light goes on and stays on until&#8230;
<li>
<li> You near your stop where a red light comes on and a buzzer/vibrator goes off. </li>
</ul>
<h3>Do It Yourself</h3>
<p> So the setup is pretty simple and the materials are cheap/easy to come by. </p>
<ul>
<li><a href="http://www.arduino.cc">Arduino </a>(or some other microcontroller thingy) </li>
<li>2 LEDs</li>
<li>1 (or more) (we used a piezo) Buzzer/vibrating motor/loud-annoying-wake-me-up-thing</li>
<li>1 accelerometer</li>
<li>1 pushbutton switch</li>
<li>1 on/off type switch
<li>
<li>power supply for arduino (we used a 9v battery)
<li>
<li>breadboard, wires, wirecutter </li>
<li>2x 220 ohm resistors, 1x 10k ohm resistor</li>
<li> A casing to hold the Device</li>
</ul>
<p><b>Circuit Diagram</b></p>
<p><a href="/img/Cdiag.png"><img src="/img/Cdiag.png" width=400 height=350 \></a></p>
<p><b>Code</b></p>
<pre>
int analogPin0 = 0;
int analogPin1 = 1;
int analogPin2 = 2;

int analogValue0 = 0;
int analogValue1 = 0;
int analogValue2 = 0;            // outgoing ADC value

int wasOn=-1;

int y = 0;

float distance, distanceo, totaldist, totaldisto;
float velocity, speedo, accel, accelo; 

int d1, d2, d3, d1o, d2o, d3o;
int count = 1;

float lowend, highend, lowendo, stayold, stayold2;
int highcount, lowcount, staycount, mystopcount, countdown;
int iteration, iterationo;

int switchPin = 7;      //  digital input pin for a switch
int yellowLedPin = 3;   //  digital output pin for an LED
int redLedPin = 6;      //  digital output pin for an LED
int buzzerPin = 8;      //  digital output pin for a buzzer
int switchState = 0;    //  the state of the switch
int stops = 2;          //  number of stops
int buzzerState = 0;    //  if buzzer is on

void setup()
{
  pinMode(switchPin, INPUT);       // set the switch pin to be an input
  pinMode(yellowLedPin, OUTPUT);   // set the yellow LED pin to be an output
  pinMode(redLedPin, OUTPUT);      // set the red LED pin to be an output
  pinMode(buzzerPin, OUTPUT);      // set the buzzer pin to be an output

  // start serial port at 9600 bps:
  Serial.begin(9600);
  lowend=highend=accel=velocity=distance=d1=d2=d3=staycount=mystopcount=0;
  iteration=0;
  lowendo=totaldisto=accelo=speedo=totaldist=distanceo=d1o=d2o=d3o=iterationo=0;
  highcount=lowcount=3;
  stayold=0; stayold2=1;
  countdown=3;
}

void loop()
{
  switchState = digitalRead(switchPin);

  analogValue0 = analogRead(analogPin0); 

  analogValue1 = analogRead(analogPin1); 

  analogValue2 = analogRead(analogPin2); 

 if (switchState == 1) {
    wasOn=1;
  }
  if(switchState == 0 &#038;&#038; wasOn == 1)
  {
    stops = stops + 1;
    //Serial.println("HAI! I'm on!");
    wasOn=0;
  }

  /*
 Serial.print(analogValue0);
 Serial.print("*");
  Serial.print(analogValue1);
   Serial.print("*");
   Serial.println(analogValue2);
   */
  // pause for 10 milliseconds:
  delay(10);

	/*
	the data is collected every 10 ms, so a count of 100 is 1 second
	*/
        if(count==100)
        {
          iteration++;

          /*
            if 3 data points are high and close enough to each other then a
	    high-end point is recorded
          */
          if(totaldist-300 > lowend) // looking for a number above the lowest
                                     //data point (lowend)
          {
            if(highcount >=2) // on the 3rd occurence of a high point within
                              // 100 points of itself, see if its ok to say
 			      // its a high point
            {

              if(totaldisto+100 >= totaldist &#038;&#038; totaldisto-100 <= totaldist)
              {  highend=totaldist; } else{ highcount=0;}
            } else { //else the count is restarted and the search for
                     // consecutive high data points continues
              if(totaldisto+100>=totaldist &#038;&#038; totaldisto-100<=totaldist)
              {  highcount++; } else { highcount=0; }
            }
          }

          /* A cheap hack. Just puts the first data point lower than the first
	     high data point into the low end point. */
          if(highend>0 &#038;&#038; lowend==0) {
            if(totaldist 0)
          {
            if(totaldist>lowend){highend=totaldist;}
          }

          /*
            if 3 data points in succession are low, then a  new low end point is
	    recorded
          */
          if(totaldist+300 < highend)// looking for a number below the high
				     //data point
          {
            if(lowcount >=2){ // on the 3rd occurence of a low data point w/in
                              // 100 points of itself, check to see if its ok
			      // to record
              if(totaldisto+100>=totaldist &#038;&#038; totaldisto-100<=totaldist)
              { lowendo=lowend; lowend=totaldist; } else {lowcount=0;}
            } else {//else the count is restarted and the search for consecutive
                    // low points resumes
              if(totaldisto+100>=totaldist &#038;&#038; totaldisto-100<=totaldist)
              {  lowcount++; } else { lowcount=0; }
            }
          }

          /*
          Serial.print("!");
          Serial.print("*");
          Serial.print(highend,DEC);
          Serial.print("*");
          Serial.print(lowend,DEC);
          Serial.print("*");
          Serial.println(totaldist,DEC);
          */

         /*if the last low end point is close enough to the current low end
        point, then start saying that maybe we're stopping or have stopped */
          if(lowendo+100>=lowend &#038;&#038; lowendo-100<=lowend)
          {staycount++; stayold2=lowendo;}else{staycount=0;}
          /* if we've been at a low end for quite a while and its not the
          beginning of the program then check to see if we've been staying
             at the same place as well and if so then say that we think that
             we've stopped */
          if(staycount>=3 &#038;&#038; highend!=0 &#038;&#038; lowend!= 0 &#038;&#038; stayold!=stayold2)
          {
            //Serial.println("@");
            stayold=lowendo;
            stayold2=stayold;
            staycount=0;
            if(mystopcount==-1)
            {
              //Serial.println("#");
              countdown--;
              stops--;
            }

	    /*
            stops--;
            Serial.print(iteration);
            Serial.print(" ");
            Serial.println(stops);
	    */
            if (stops == 1) {
              digitalWrite(yellowLedPin, HIGH);   // turn on the yellow LED
            }
            if (stops == 0) {
              digitalWrite(yellowLedPin, LOW);   // turn off the yellow LED
              digitalWrite(redLedPin, HIGH);     // turn on the red LED
              digitalWrite(buzzerPin, HIGH);     // turn on the buzzer
              buzzerState = 1;
              stops=0;
            }

            mystopcount++;
            iterationo=iteration;

          }

          //this is the number we need to play with to finesse things
          if(iterationo+8 < iteration){mystopcount=-1;}
          if(iterationo+3 < iteration){
          digitalWrite(buzzerPin, LOW); digitalWrite(redLedPin,LOW);
        }

          /* reset distances and times */
          totaldisto=totaldist;
          totaldist=0;
          count=1;

          speedo=velocity;
          accelo=accel;

        }

        /*below this line is all graph data */

        //X
        y = analogValue0;
        d1 =  y- d1o;
        d1o = y;

        //Y
        y = analogValue1;
        d2 = y - d2o;
        d2o = y;

        //Z
        y = analogValue2;
        d3 = y - d3o;
        d3o = y;

        //Distance
        if(d1o != 0 &#038;&#038; d2o != 0 &#038;&#038; d3o != 0)
        {
          distance = sqrt(sq(d1)+sq(d2)+sq(d3));
          distanceo= distance;
        }

        //Speed (averaged over time (every reading is 1 second)), reset @ STOPs
        totaldist+=distance;  //DONT'T DELETE THIS LINE OR EVERYTHING WILL DIE
        velocity = totaldist/count;

        //Accel
        accel = velocity/count;

        count++;  //OR THIS
}
</pre>
<h3>Thoughts, Commnets, Concerns</h3>
<p>So this project went along at pretty steady pace. We had a few hiccoughs in the beginning, trying to interpret the accelerometer data in order to extrapolate the speed and then figure out how to detect a "stop" from all of that mess. <br \> Once we got that figured out, it was just a matter of actually riding the train trying to fine tune our settings. The most trouble we had (still have actually) was with detecting false stops. Where the train decelerates while underground or stops for some train delay or another. <br \> We've thought about combining the accelerometer with an audio sensor or something but none of those ideas were really feasible in the amount of time we had. So right now the Device only works for the 4/6 train line and its sometimes a bit shaky at that. </p>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/12/10/train-stop-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>intermission</title>
		<link>http://jelanijohn.com/2008/12/02/intermission/</link>
		<comments>http://jelanijohn.com/2008/12/02/intermission/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 03:46:07 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=304</guid>
		<description><![CDATA[So, time being what it is, I thought I&#8217;d post an update on the status of the train stop watch project. Tim and I have toiled and struggled and finally we&#8217;ve gotten our code working. Our data from last time was correct. Our math, however, was not. We were taking the speed by averaging over [...]]]></description>
			<content:encoded><![CDATA[<p>So, time being what it is, I thought I&#8217;d post an update on the status of the train stop watch project. <br /> Tim and I have toiled and struggled and finally we&#8217;ve gotten our code working. Our data from last time was correct. Our math, however, was not. We were taking the speed by averaging over all the samples, instead of over an interval. So now we&#8217;re getting the speed by averaging all the intervals (at 10ms) per second. So now we&#8217;re getting clear acceleration and deceleration in the data. <br />
So the logic behind our program is as follows:</p>
<p><br \></p>
<ol>
<li>We sample the speed each second.</li>
<li>We baseline the high and low speeds at the start of the program.</li>
<li>We determine new high and low speeds based on a simple algorithm. If there is a new high/low point that is steady (within 100 of each other), and 300 away from the current (high if low and low if high) point, for 3 seconds then a new high/low is set. Simple, right?</li>
<li>If there is a constant deceleration for 6~ish seconds, we say &#8220;Ok, we&#8217;ve detected a stop.&#8221;</li>
</ol>
<p><br \></p>
<p> This is all fairly accurate so far and the data reflects it except for a few false negatives that we hope to smooth out by changing the constant deceleration time from 6 seconds to 10ish. We&#8217;ll have to play around w/ that.<br />
Right now we just have to actually build a case for our project, and maybe pretty up the input/output mechanisms. Right now we just have a switch that we push to raise the stop count and some lights/a buzzer that can go off.</p>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/12/02/intermission/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Train Watch</title>
		<link>http://jelanijohn.com/2008/11/19/train-watch/</link>
		<comments>http://jelanijohn.com/2008/11/19/train-watch/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 16:18:14 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=285</guid>
		<description><![CDATA[So here we sit. Our laptop is broken. We cry. We cry. And then we remember. So trains go places. And we go with them. Our sleepiness and bookreading goes with us. The train stops interrupt. Grr. Why do you interrupt? Why? So we no longer notice the stops. But the end approaches. The end [...]]]></description>
			<content:encoded><![CDATA[<p>So here we sit. Our laptop is broken. We cry. We cry. And then we remember. So trains go places. And we go with them. Our sleepiness and bookreading goes with us. The train stops interrupt. Grr. Why do you interrupt? Why?<br />
<br \><br />
So we no longer notice the stops. But the end approaches. The end of our journey. The end of our life on the train. The end of all things trainy. A notification is required.<br />
<br \><br />
Viola! Train Watch. It buzzes, it beeps, it blinks. Ok, that was a lie. It only buzzes. We have data, yes we do. Data the likes of which you have never seen. We can haz colored linez? Yes. Yes we can.<br />
<br \><br />
STOP. Image time.<br />
<a href="http://www.jelanijohn.com/data.jpg"><img height="300" width="300" src="http://www.jelanijohn.com/data.jpg" alt="" /></a><br />
The Key:<br />
color  ==  data<br />
red     &#8212;  x<br />
green  &#8212;  y<br />
blue    &#8212;  z</p>
<p>purple &#8212; distance<br />
teal    &#8212; speed<br />
black  &#8212; acceleration<br />
vertical blue &#8211; stops/starts</p>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/11/19/train-watch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pcomp final ideas</title>
		<link>http://jelanijohn.com/2008/11/05/pcomp-final-ideas/</link>
		<comments>http://jelanijohn.com/2008/11/05/pcomp-final-ideas/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 17:36:45 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=263</guid>
		<description><![CDATA[Ok, so here&#8217;s my top ideas: (wrote them late last night before i went to bed so the grammar may be a bit wierd) ok, so a shadow thing that goes buh bum buh bum and changes to match your shape &#8211; built out of cloth &#8211; mini doll thing pic1 passerby-shadows captured-fade down as [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so here&#8217;s my top ideas: (wrote them late last night before i went to bed so the grammar may be a bit wierd)<br \> </p>
<ul>
<li>ok, so a shadow thing that goes buh bum buh bum and changes to match your shape &#8211; built out of cloth &#8211; mini doll thing <a href="http://jelanijohn.com/physcomp/CameraDump 802.jpg">pic1  </a></li>
<li> passerby-shadows captured-fade down as time pass-worn out by footstep vibrations- blend softly smooth into each other-twist and morph-and then cease to exist. <b>OR</b> dancing shadow <br \> <a href="http://jelanijohn.com/physcomp/CameraDump 795.jpg">pic</a> <a href="http://jelanijohn.com/physcomp/CameraDump 799.jpg">pic2</a></li>
<li>minature house filled w/ booby traps <a href="http://jelanijohn.com/physcomp/CameraDump 793.jpg">pic</a></li>
<li>watch that notifies you when your stop is coming up on the train <a href="http://jelanijohn.com/physcomp/CameraDump 804.jpg">pic</a></li>
<li>device that switches your music if it senses you&#8217;re falling asleep <a href="http://jelanijohn.com/physcomp/CameraDump 800.jpg">pic</a></li>
<li>a device to detect if you&#8217;re doing a motion (say martial arts form) correctly <a href="http://jelanijohn.com/physcomp/CameraDump 805.jpg">pic</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/11/05/pcomp-final-ideas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>relax</title>
		<link>http://jelanijohn.com/2008/10/27/relax/</link>
		<comments>http://jelanijohn.com/2008/10/27/relax/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:45:30 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=240</guid>
		<description><![CDATA[So this past weekend, our assignment was to relax. A bit of a foreign concept, I first tried getting large amounts of sleep. That, failing to impress me, I spent the day wandering around the city, seeing the sights. I saw the chanel exhibit in the part (rather well done i think) as well as [...]]]></description>
			<content:encoded><![CDATA[<p>So this past weekend, our assignment was to relax. A bit of a foreign concept, I first tried getting large amounts of sleep. That, failing to impress me, I spent the day wandering around the city, seeing the sights. I saw the chanel exhibit in the part (rather well done i think) as well as a pumpkin festival at the same time. I almost visited MAD, but got spirited away at the last moment for a romp around times square.</p>
<p> Oh! And i finally was able to find the time to clean my apartment after two weeks. I went to Oscar&#8217;s bday party and hung out with friends here and there. It was good times really. Good times. Now the week isn&#8217;t quite over so i&#8217;m going to go and get as much more relaxing in as possible.
</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/10/27/relax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deployment &amp; Analysis: The Book Project</title>
		<link>http://jelanijohn.com/2008/10/22/deployment-analysis-the-book-project/</link>
		<comments>http://jelanijohn.com/2008/10/22/deployment-analysis-the-book-project/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 08:29:54 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=209</guid>
		<description><![CDATA[It&#8217;s been a long road. For the short version of this post, click here. My groupmates for this project were: Jayoung Chung, &#8220;Neo&#8221; Sangzoon Park, and Ozge Kirimlioglu. First, the results How it all began We started with an idea of an idea. Well really, it was more like an idea of an idea&#8217;s grandmother&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/bp/bp37.JPG"><img height="249" width="372" alt="" src="/bp/bp37.JPG" border="0" /></a></p>
<p>It&#8217;s been a long road. For the short version of this post, click <a href="http://jelanijohn.com/bookproject.html">here</a>.</p>
<p> <br \></p>
<p>My groupmates for this project were: <a href="http://itp.nyu.edu/blogs/jyc334/category/uncategorized/">Jayoung Chung</a>, <a href="http://neobarc.com/?cat=16">&#8220;Neo&#8221; Sangzoon Park</a>, and <a href="http://itp.nyu.edu/blogs/ok384/">Ozge Kirimlioglu</a>.</p>
<p><br \></p>
<h2>First, the results</h2>
<p><embed src="http://blip.tv/play/AdTxRQA" type="application/x-shockwave-flash" width="320" height="205" allowscriptaccess="always" allowfullscreen="true"></embed><br \><br />
<br \></p>
<h2>How it all began</h2>
<p><span id="more-209"></span><br />
We started with an idea of an idea. Well really, it was more like an idea of an idea&#8217;s grandmother&#8217;s 3rd cousin, twice removed. By which I mean, we all had different ideas and aethetics that we wanted to push onto this project. Books, nature scenes, moons, clocks, the abstract or even &#8220;anything so long as it&#8217;s cool.&#8221; It took a week before we managed to narrow ourselves down into something all parties could agree upon.<br \><br />
We were going to gut a book, and create a system reminiscent of the free-writing exercises many prose writers practice. <br \><br />
<br \></p>
<h2>The components </h2>
<ul>
<li> 1 x Holy Bible </li>
<li> 1 x Biographical Directory of the American Congress (1774-1971) </li>
<li> 2 x Solenoids (push style) </li>
<li> 20 x Assorted plastic dice. </li>
<li> 1 x Arduino board </li>
<li> Scissors, glue, saws, wires, force sensors&#8230; you know&#8230; all that good stuff.</li>
</ul>
<p><br \></p>
<h2>Workflow</h2>
<p>I&#8217;d like to start off by saying test, TEST, <strong>TEST!!!1</strong>. We tested and prototyped everything all through the build process and it saved us lots of time. <br \><br />
So we ordered our solenoids from <a href="http://www.mcmaster.com/">McMaster-Carr&#8217;s</a>, got our old books from <a href="http://www.strandbooks.com/">Strand&#8217;s</a> and got a bunch of cubes from <a href="http://www.canalplasticscenter.com/">Canal Plastics</a>.<br \><br />
The first thing we did when we got our solenoid&#8217;s was &#8230; you guessed it! Tested em out. It would have sucked if the solenoid&#8217;s didn&#8217;t work. Luckily they did. <br \><br />
<a href="/bp/bp01.JPG"><img height="124" width="83" alt="" src="/bp/bp01.JPG" border="0" /></a> <a href="/bp/bp02.JPG"><img height="124" width="83" alt="" src="/bp/bp02.JPG" border="0" /></a> <a href="/bp/bp03.JPG"><img height="124" width="83" alt="" src="/bp/bp03.JPG" border="0" /></a> <a href="/bp/bp04.JPG"><img height="124" width="83" alt="" src="/bp/bp04.JPG" border="0" /></a> <br \><br />
Next, we bought and cut all our book, which btw was the Holy Bible. We really liked the idea of using a bible for this. The only one who kind of got upset about it was the cleaning guy, but i&#8217;m not sure if he was joking or not.<br \><br />
<a href="/bp/bp05.JPG"><img height="83" width="124" alt="" src="/bp/bp05.JPG" border="0" /></a> <a href="/bp/bp06.JPG"><img height="83" width="124" alt="" src="/bp/bp06.JPG" border="0" /></a> <a href="/bp/bp08.JPG"><img height="83" width="124" alt="" src="/bp/bp08.JPG" border="0" /></a> <a href="/bp/bp10.JPG"><img height="83" width="124" alt="" src="/bp/bp10.JPG" border="0" /></a><br />
<br \><br />
More cutting was required to give the book a more aethetically pleasing shape and also, the solenoids had to be mounted for even more testing.<br />
<a href="/bp/bp13.JPG"><img height="124" width="83" alt="" src="/bp/bp13.JPG" border="0" /></a> <a href="/bp/bp14.JPG"><img height="83" width="124" alt="" src="/bp/bp14.JPG" border="0" /></a> <a href="/bp/bp15.JPG"><img height="83" width="124" alt="" src="/bp/bp15.JPG" border="0" /></a> </p>
<p><a href="/bp/bp17.JPG"><img height="83" width="124" alt="" src="/bp/bp17.JPG" border="0" /></a> <a href="/bp/bp18.JPG"><img height="83" width="124" alt="" src="/bp/bp18.JPG" border="0" /></a> <a href="/bp/bp19.JPG"><img height="83" width="124" alt="" src="/bp/bp19.JPG" border="0" /></a><br />
<br \><br />
Meanwhile, the plastic cubes had to be etched and filled with paint, and there was soldeirng and wiring to be done. Nothing too fancy. They two solenoids required ~4A of current and ~12V of power. We *ahem* salvaged an old variable power supply and hooked it up to fix our needs.<br />
<a href="/bp/bp09.JPG"><img height="83" width="124" alt="" src="/bp/bp09.JPG" border="0" /></a> <a href="/bp/bp11.JPG"><img height="83" width="124" alt="" src="/bp/bp11.JPG" border="0" /></a> <a href="/bp/bp12.JPG"><img height="83" width="124" alt="" src="/bp/bp12.JPG" border="0" /></a><br />
<br \><br />
One problem that came up was how to get the cubes to pop properly. The thing with a book is that it absorbs force quite well if there&#8217;s just a solid board going across it. So we came up with a prototype that involved springs, so that the board had some give. In the end though, we went with stretchy cloth. That way there were no gaps, plus then we could put a nice design of print on it.<br />
<a href="/bp/bp07.JPG"><img height="83" width="124" alt="" src="/bp/bp07.JPG" border="0" /></a> <a href="/bp/bp16.JPG"><img height="83" width="124" alt="" src="/bp/bp16.JPG" border="0" /></a> <a href="/bp/bp29.JPG"><img height="83" width="124" alt="" src="/bp/bp29.JPG" border="0" /></a> <a href="/bp/bp30.JPG"><img height="83" width="124" alt="" src="/bp/bp30.JPG" border="0" /></a><br />
<br \><br />
More testing! We set up our device on some blocks and put a clear piece of plastic so we could observe.<br />
<a href="/bp/bp21.JPG"><img height="83" width="124" alt="" src="/bp/bp21.JPG" border="0" /></a> <a href="/bp/bp22.JPG"><img height="124" width="83" alt="" src="/bp/bp22.JPG" border="0" /></a> <a href="/bp/bp23.JPG"><img height="83" width="124" alt="" src="/bp/bp23.JPG" border="0" /></a> <a href="/bp/bp24.JPG"><img height="124" width="83" alt="" src="/bp/bp24.JPG" border="0" /></a> </p>
<p><a href="/bp/bp25.JPG"><img height="124" width="83" alt="" src="/bp/bp25.JPG" border="0" /></a> <a href="/bp/bp26.JPG"><img height="124" width="83" alt="" src="/bp/bp26.JPG" border="0" /></a> <a href="/bp/bp27.JPG"><img height="124" width="83" alt="" src="/bp/bp27.JPG" border="0" /></a> <a href="/bp/bp28.JPG"><img height="83" width="124" alt="" src="/bp/bp28.JPG" border="0" /></a><br />
<br \><br />
Now, it was just time to assemble and fine tune. There were a couple minor things. Had to drill a hole in the larger american congress book we were using for a base to hold the solenoids. We didn&#8217;t have any drill bits that were the perfect size, so we had to retain the mounting board we used for the prototype above to hold them in place. <br \> The base also had to be stained (with coffee grounds) to match the coloring of the top book. Gave it a nice &#8220;aged&#8221; look. Also, as you can see the cool-looking cubes were also a bit hard to read, so we decided to cover it up with tape and add snippets form the excess pages. It worked out pretty well, though I do wish we could have incorporated some of the words that god left behind. Like&#8230; &#8220;jabberwocky&#8221; or &#8220;sesquipedal&#8221;.<br />
<a href="/bp/bp31.JPG"><img height="124" width="83" alt="" src="/bp/bp31.JPG" border="0" /></a> <a href="/bp/bp20.JPG"><img height="83" width="124" alt="" src="/bp/bp20.JPG" border="0" /></a> <a href="/bp/bp32.JPG"><img height="83" width="124" alt="" src="/bp/bp32.JPG" border="0" /></a> <a href="/bp/bp33.JPG"><img height="83" width="124" alt="" src="/bp/bp33.JPG" border="0" /></a><br />
<br \><br />
One last casualty, Jayoung&#8217;s Arduino board died due to a mistake of wiring.<br />
<a href="/bp/bp34.JPG"><img height="83" width="124" alt="" src="/bp/bp34.JPG" border="0" /></a><br />
<br \><br />
Done at last, we spent the last little bit taking pictures of our finished product, documenting it all, and generally making merry (except not so much with the making merry).<br />
<a href="/bp/bp35.JPG"><img height="83" width="124" alt="" src="/bp/bp35.JPG" border="0" /></a> <a href="/bp/bp36.JPG"><img height="83" width="124" alt="" src="/bp/bp36.JPG" border="0" /></a> <a href="/bp/bp37.JPG"><img height="83" width="124" alt="" src="/bp/bp37.JPG" border="0" /></a> <a href="/bp/bp38.JPG"><img height="83" width="124" alt="" src="/bp/bp38.JPG" border="0" /></a></p>
<p><a href="/bp/bp39.JPG"><img height="83" width="124" alt="" src="/bp/bp39.JPG" border="0" /></a> <a href="/bp/bp40.JPG"><img height="83" width="124" alt="" src="/bp/bp40.JPG" border="0" /></a> <a href="/bp/bp41.JPG"><img height="83" width="124" alt="" src="/bp/bp41.JPG" border="0" /></a> <a href="/bp/bp42.JPG"><img height="83" width="124" alt="" src="/bp/bp42.JPG" border="0" /></a></p>
<p><a href="/bp/bp43.JPG"><img height="83" width="124" alt="" src="/bp/bp43.JPG" border="0" /></a> <a href="/bp/bp44.JPG"><img height="83" width="124" alt="" src="/bp/bp44.JPG" border="0" /></a> <a href="/bp/bp45.JPG"><img height="83" width="124" alt="" src="/bp/bp45.JPG" border="0" /></a> <a href="/bp/bp46.JPG"><img height="83" width="124" alt="" src="/bp/bp46.JPG" border="0" /></a></p>
<p><a href="/bp/bp47.JPG"><img height="83" width="124" alt="" src="/bp/bp47.JPG" border="0" /></a> <a href="/bp/bp48.JPG"><img height="83" width="124" alt="" src="/bp/bp48.JPG" border="0" /></a> <a href="/bp/bp49.JPG"><img height="83" width="124" alt="" src="/bp/bp49.JPG" border="0" /></a> <a href="/bp/bp50.JPG"><img height="83" width="124" alt="" src="/bp/bp50.JPG" border="0" /></a></p>
<p><a href="/bp/bp51.JPG"><img height="83" width="124" alt="" src="/bp/bp51.JPG" border="0" /></a> <a href="/bp/bp52.JPG"><img height="83" width="124" alt="" src="/bp/bp52.JPG" border="0" /></a> <a href="/bp/bp53.JPG"><img height="83" width="124" alt="" src="/bp/bp53.JPG" border="0" /></a> <a href="/bp/bp54.JPG"><img height="83" width="124" alt="" src="/bp/bp54.JPG" border="0" /></a><br />
<br \></p>
<h2> Overall Impression </h2>
<p>I enjoyed working on this project. Everyone brought something to the table.<br />
Jayoung had a strong artistic flair, Neo rocks with electronics, Ozge has a good eye for details. We did take some time reach a consensus for what to do, but that&#8217;s to be expected when so many people with different skillsets mix. I look foward to working with them all again (and I&#8217;m not just saying that to be nice =p ).</p>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/10/22/deployment-analysis-the-book-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototypin&#8217; (midterm docs p1)</title>
		<link>http://jelanijohn.com/2008/10/14/prototypin-midterm-docs-p1/</link>
		<comments>http://jelanijohn.com/2008/10/14/prototypin-midterm-docs-p1/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 03:58:00 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=183</guid>
		<description><![CDATA[Jayoung, Neo, Ozge and I (henceforth refered to as the Gibbering Rulers of Über People a.k.a. &#8220;the Group&#8221;), came up with an idea to create a random free-write-style word generator. I spent a bit of last night testing stuff out with a small prototype and the most important thing I learned was this. It&#8217;s hard [...]]]></description>
			<content:encoded><![CDATA[<p>Jayoung, Neo, Ozge and I (henceforth refered to as the Gibbering Rulers of Über People a.k.a. &#8220;the Group&#8221;), came up with an idea to create a random free-write-style word generator. <br \><br />
I spent a bit of last night testing stuff out with a small prototype and the most important thing I learned was this. It&#8217;s hard to flip dice. It&#8217;s easy to make a ball roll. This startling and amazing revelation will surely shock and astonish the rest of the Group as well (we&#8217;ve been stuck on this cube idea for a bit now). I shall surely let them know tomorrow. <br \></p>
<p><a href="http://jelanijohn.com/wp-content/uploads/2008/10/cameradump-779.jpg"><img src="http://jelanijohn.com/wp-content/uploads/2008/10/cameradump-779-300x225.jpg" alt="" title="cameradump-779" width="300" height="225" class="aligncenter size-medium wp-image-184" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/10/14/prototypin-midterm-docs-p1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Una palabra no dice nada&#8230;</title>
		<link>http://jelanijohn.com/2008/10/07/una-palabra-no-dice-nada/</link>
		<comments>http://jelanijohn.com/2008/10/07/una-palabra-no-dice-nada/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 08:47:30 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=162</guid>
		<description><![CDATA[&#8230; and neither does a picture. Or something like that. So my first time into processing and&#8230; i kinda like it. My only gripe is it&#8217;s name. I dare you to go to google and look do a casual search for code using the name &#8220;processing.&#8221; Go ahead. I&#8217;ll wait. Anyhoo, here&#8217;s my etch-a-sketch. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230; and neither does a picture. Or something like that.<br \><br />
So my first time into processing and&#8230; i kinda like it. My only gripe is it&#8217;s name. I dare you to go to google and look do a casual search for code using the name &#8220;processing.&#8221; Go ahead. I&#8217;ll wait.<br \><br />
Anyhoo, here&#8217;s my etch-a-sketch.<br />
<embed src="http://blip.tv/play/AdHYIAA" type="application/x-shockwave-flash" width="360" height="255" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<p><span id="more-162"></span><br />
Here&#8217;s the <strong>processing code</strong>: </p>
<pre>
import processing.serial.*;

Serial myPort;
int xpos, ypos;

int pingX=0,pingY=0;

/*
  this will be a psuedo matrix to hold
  all generated points. the main index of
  bob will represent x, while the arraylist
  of that index will hold all the y points
  along that x line that are lit up.
 */
ArrayList[] bob;

//the pinging you-are-here circle
subPoint p = new subPoint();

void setup () {
  myPort = new Serial(this, "COM4", 9600);
  myPort.bufferUntil('\n');

  size(512, 512);
  xpos=ypos=0;

  bob = new ArrayList[513];
  for(int i=0;i<513;i++)
  {
    bob[i]=new ArrayList();
  }
}

void serialEvent (Serial myPort) {
  String data = myPort.readStringUntil('\n');
  if(data!=null)
  {
    println(data);
    data = trim(data);
    int inputs[] = int(split(data,'-'));

    if(inputs.length > 1)
    {
      xpos=inputs[0];
      ypos=512-inputs[1];

      if(!bob[xpos].contains(ypos)){ bob[xpos].add(ypos);}

      pingX++;
      pingY++;
      if(pingX>45){pingX=pingY=0;}

      if(inputs[2]==1){ clear(); }
    }
  }
}

void clear()
{
  for(int i=0;i<513;i++)
  {
    bob[i].clear();
  }
}

void draw () {
  background(255);
  stroke(0,255,0);

  for(int i=0;i<513;i++)
  {
    if(!bob[i].isEmpty())
    {
      for(int j=0;j < bob[i].size();j++)
      {
        String s = bob[i].get(j).toString();
        point(i,int(s));
      }
    }
  }
  p.update(xpos,ypos);
}

class subPoint {

  void update(float x, float y)
  {
    stroke(255,0,0);
    noFill();
    ellipse(x+1,y+1,pingX/3,pingY/3);
  }
}
</pre>
<p><br \><br />
The <strong>arduino code</strong> is relatively simple:</p>
<pre>
int aPin1 = 0;
int aPin2 = 1;
int aVal = 0;
int dPin = 2;

void setup()
{
  Serial.begin(9600);
  pinMode(dPin,INPUT);
}

void loop()
{
  aVal = analogRead(aPin1);
  aVal = map(aVal,0,1024,0,512);
  Serial.print(aVal,DEC);
  Serial.print('-');
  aVal = analogRead(aPin2);
  aVal = map(aVal,0,1024,0,512);
  Serial.print(aVal, DEC);
  Serial.print('-');
  aVal = digitalRead(dPin);
  Serial.println(aVal, DEC);
  // pause for 10 milliseconds:
  delay(10);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/10/07/una-palabra-no-dice-nada/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Idea Factory, part 2</title>
		<link>http://jelanijohn.com/2008/10/01/idea-factory-part-2/</link>
		<comments>http://jelanijohn.com/2008/10/01/idea-factory-part-2/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 04:17:49 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=145</guid>
		<description><![CDATA[OK! Unloading the old noggin again. Hat Angle: As a man, you should wear your hat at a rakish angle. However, finding the right angle for you can take quite alot of mirror work. And once you find it, if you take off the hat, you have to find it again the next time. So, [...]]]></description>
			<content:encoded><![CDATA[<p>OK! Unloading the old noggin again.<br />
<br \></p>
<ul>
<li><strong>Hat Angle</strong>: As a man, you should wear your hat at a rakish angle. However, finding the right angle for you can take quite alot of mirror work. And once you find it, if you take off the hat, you have to find it again the next time. So, make a device that remembers the position at which you last wore your hat, allowing you to make only minute adjustments the next time. </li>
<li><strong>Sk8ter Love</strong>: So yea, I bought a skateboard a few months ago, but this-and-that happened and I havnt been able to ride it more than 4 times. But! From what I&#8217;ve noticed while teaching myself to ride, I have a tendency to get .. not scared, but unnerved while going down steep hills really fast (or at least really fast to me). It would be nice to have some sort of feedback device letting me know ~how fast I&#8217;m going or that I&#8217;m still on balance. Give me some artificial confidence &#8230; or let me know that if i don&#8217;t hop off soon I may die. <small>Also.. can someone teach me the proper way to stop on a skateboard? <img src='http://jelanijohn.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  </small></li>
<li><strong>Auto Airbag</strong>: This would be a personal airbag, you could strap onto your body. It detects when you&#8217;re moving faster than a certain speed, say&#8230; 9.8 m/s and when a collision w/ something is immenent it deploys an airbag in that direction. So you could possibly just throw yourself at the ground&#8230; at the walls&#8230; at people all day long and never suffer any damage. </li>
<li><strong>Exersize Buddy</strong>: Mmm, I&#8217;ve not really worked out at all since I started the moving process a few months ago. And trying to fit in gym time while living in BK and school in Manhattan hasn&#8217;t really been working out. Usually I get to ITP with only 15 minutes to spare and by the time I&#8217;m finished my work on the floor I just wanna go eat/sleep/die. But the real problem lies at home. I absolutely hate working out just by itself. If i&#8217;m at the gym then I&#8217;ll get in a solid hour because I don&#8217;t want to end up looking like a punk. But at home, it&#8217;s just me&#8230; and I lack motivation. So! Introducing the Exercize Buddy. You put a number in the system and have to touch two things togehter 100 times. It turns into a game. Touch them together by doing pushups, jumping jacks, situps. Oh yea, and it yells encouragement at you, Ahnold Shwartz style. &#8220;Ya&#8230; do eet. Pump dat iron!&#8221;, and such.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/10/01/idea-factory-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>longdesc</title>
		<link>http://jelanijohn.com/2008/09/29/longdesc/</link>
		<comments>http://jelanijohn.com/2008/09/29/longdesc/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 04:20:09 +0000</pubDate>
		<dc:creator>jelani</dc:creator>
				<category><![CDATA[Communications Lab]]></category>
		<category><![CDATA[ITP]]></category>
		<category><![CDATA[Physical Computing]]></category>

		<guid isPermaLink="false">http://jelanijohn.com/?p=141</guid>
		<description><![CDATA[Alright, so this is a joint commlab/physcomp post. I&#8217;m supposed to document one of my projects for commlab, so it all worked out. Here&#8217;s the video. I started toying around with the servo, but I really wanted to play with the piezo. I wanted to create a different sound based on the user&#8217;s input. I [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, so this is a joint commlab/physcomp post. I&#8217;m supposed to document one of my projects for commlab, so it all worked out.</p>
<p>Here&#8217;s the video.<br />
<embed src="http://blip.tv/play/Ac_5JgA" type="application/x-shockwave-flash" width="320" height="270" allowscriptaccess="always" allowfullscreen="true"></embed><br />
<br \><br />
I started toying around with the servo, but I really wanted to play with the piezo. I wanted to create a different sound based on the user&#8217;s input. I had a force sensor, so I jury rigged some code up to do interesting stuff. At first there was a problem when I tried to upgrade the arduino program and found that it was broken. Oh well. Back down to version 0011.<br />
<br \><br />
So, what i was trying to do is let a user make a 3-note song. But this sound stuff is harder than it seems. I kept having trouble getting the delay right for to seperate the notes, so really what you&#8217;re hearing in the video is 3 notes being played very fast, but it sounds like one sound. Still, it&#8217;s generally what I was aiming for. I need to figure out the delays more. But not now. Later.<br />
<br \><br />
And here&#8217;s the code:<br />
<span id="more-141"></span></p>
<pre>
int speakerOut = 9;  // Set up speaker on a PWM pin (digital 9, 10 or 11)
int analogValue = 0;  // the value returned from the analog sensor
int analogPin = 0;    // the analog pin that the sensor's on

void setup() {
  pinMode(speakerOut, OUTPUT);
  Serial.begin(9600);
}

int notes[] = { 261, 261, 261 };
int times[] = { 1, 1, 1 };
int i=0;
int j=0;
int state=0;
unsigned long time=0;

void loop() {
  if(j>3){j=0;}
  if(j==0)
  {
    Serial.println("Hi! Enter first note.");
    getNote(j);
    Serial.println(notes[j]);
    Serial.println(times[j]);
    Serial.println("Ok! Processing the note.");
    delay(2000);

    Serial.print("enddelay");
  }else if(j==1)
  {
    getNote(j);
    Serial.println("Hi! Enter second note.");
    Serial.println(notes[j]);
    Serial.println(times[j]);
    Serial.println("Ok! Processing the note.");
    delay(2000);
  }else if(j==2)
  {
    getNote(j);
    Serial.println("Hi! Enter 3rd note.");
    Serial.println(notes[j]);
    Serial.println(times[j]);
    Serial.println("Ok! Processing the note.");
    delay(2000);
  }else if(j==3)
  {
    Serial.println("Who's awesome? You're awesome!");
    Serial.println("Ok, listen to your tune and whenever
           you're ready to stop, just press the button.");
    playIt();
    Serial.println("Back!");
    delay(2000);
  }
  j++;
}

//gets the user input note and how long it took them to input it
void getNote(int i)
{
  time=millis();
  int analogValueOld=0;
  while(1)
  {

    analogValue = analogRead(analogPin);
    if(analogValue > 4)
    {
      while(analogValue > 4)
      {
        analogValue = analogRead(analogPin);
        if(analogValueOld < analogValue) {analogValueOld=analogValue;}
      }

      notes[i]=map(analogValueOld,0,870,3830,1912);
      times[i]=abs(millis()-time);
      return;
    }
  }
}

//play the tune till user stops it
void playIt()
{
  while(1)
  {
    //Serial.println(analogValue);
    analogValue = analogRead(analogPin);
    while(analogValue < 50)
    {
      if(analogValue >=50)
      {
        digitalWrite(speakerOut,LOW);
        return; // in theory, this should return out of the function
                  //but it's acting like a break
      }
      for(int i=0;i<3;i++)
      {
        for(int j=times[i]*1000;j>0;j-=(notes[i]/2))
        {
           digitalWrite(speakerOut,HIGH);
           delayMicroseconds(notes[i]/ 2);
           digitalWrite(speakerOut,LOW);
           delayMicroseconds(notes[i]/ 2);
        }
        delayMicroseconds(times[1]*times[2]*times[3]*150);
      }
      analogValue = analogRead(analogPin);
    }
    return; // so that's why i had to use two return statements
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jelanijohn.com/2008/09/29/longdesc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

