Recent Changes - Search:

Main
Intro to PComp Home
Weekly Topics & Assignments
Wednesday Class Dates

Links:

Final Projects


Midterm Projects

PmWiki

edit SideBar

BryanWall

Final Project

Finished
The controls look terrible, and I may not have time to have them covered up by presentation time, but the board works and that's what's most important.











And here's a video
http://bryanbwall.net/videos/physcomp_final.mov

The Board is Complete



Two Walls Lit



One Wall Lit




Assembling the board



6 Lights Are Cooler Than 1


This Is How God Feels
So, I just got a tri-color LED to go through the color spectrum. It's an unbelievably gratifying experience. I'm way too excited.

http://itp.nyu.edu/~bbw218/physcomp/final/lightsTest.avi

CODE:
int startPin = 13; int redPin = 9; int bluePin = 10; int greenPin = 11;

int hueIn = 0; int hueInPin = 5; int highestHue = 0;

int brightIn = 0; int brightInPin = 4; int highestBright = 0;

int rMax = 103; int gbMax = 180;

int interval = 200; long lastTime = 0;

int redValues[8] = {103, 103, 103, 0, 0, 60, 103, 103}; int greenValues[8] = {0, 40, 180, 180, 0, 0, 0, 180}; int blueValues[8] = {0, 0, 0, 0, 180, 180, 100, 180};

void setup(){

  Serial.begin(9600);
  pinMode(startPin, OUTPUT);

  blink(startPin, 3, 300);
  testColors();

}

void loop(){

  hueIn = analogRead(hueInPin)/128;
  brightIn = analogRead(brightInPin)/51;

 if (hueIn > highestHue){
   highestHue = hueIn;
 }

 if(brightIn > highestBright){
   highestBright = brightIn;
 }

 Serial.println(highestBright);

 if(millis() - lastTime > interval){
   lastTime = millis();

 if(highestHue == 7){
  analogWrite(redPin, redValues[7]/(highestBright+1));
  analogWrite(greenPin, greenValues[7]/(highestBright+1));
  analogWrite(bluePin, blueValues[7]/(highestBright+1));
 }else if(highestHue == 6){
   analogWrite(redPin, redValues[6]/(highestBright+1));
  analogWrite(greenPin, greenValues[6]/(highestBright+1));
  analogWrite(bluePin, blueValues[6]/(highestBright+1));
 }else if(highestHue == 5){
   analogWrite(redPin, redValues[5]/(highestBright+1));
  analogWrite(greenPin, greenValues[5]/(highestBright+1));
  analogWrite(bluePin, blueValues[5]/(highestBright+1));
 }else if(highestHue == 4){
   analogWrite(redPin, redValues[4]/(highestBright+1));
  analogWrite(greenPin, greenValues[4]/(highestBright+1));
  analogWrite(bluePin, blueValues[4]/(highestBright+1));
 }else if(highestHue == 3){
   analogWrite(redPin, redValues[3]/(highestBright+1));
  analogWrite(greenPin, greenValues[3]/(highestBright+1));
  analogWrite(bluePin, blueValues[3]/(highestBright+1));
 }else if(highestHue == 2){
   analogWrite(redPin, redValues[2]/(highestBright+1));
  analogWrite(greenPin, greenValues[2]/(highestBright+1));
  analogWrite(bluePin, blueValues[2]/(highestBright+1));
 }else if(highestHue == 1){
   analogWrite(redPin, redValues[1]/(highestBright+1));
  analogWrite(greenPin, greenValues[1]/(highestBright+1));
  analogWrite(bluePin, blueValues[1]/(highestBright+1));
 }else{
   analogWrite(redPin, redValues[0]/(highestBright+1));
  analogWrite(greenPin, greenValues[0]/(highestBright+1));
  analogWrite(bluePin, blueValues[0]/(highestBright+1));
 }
 highestHue = 0;
 highestBright = 0;
 }

}

void blink(int whatPin, int howManyTimes, int milliSecs) {

  int i = 0;
  for ( i = 0; i < howManyTimes; i++) {
    digitalWrite(whatPin, HIGH);
    delay(milliSecs/2);
    digitalWrite(whatPin, LOW);
    delay(milliSecs/2);
  }

}

/*Run a test of all Colors*/ void testColors(){

  analogWrite(redPin, 103);
  delay(800);
  analogWrite(redPin, 0);
  analogWrite(greenPin, 180);
  delay(800);
  analogWrite(greenPin, 0);
  analogWrite(bluePin, 180);
  delay(800);
  analogWrite(bluePin, 0);
  analogWrite(redPin, rMax);
  analogWrite(greenPin, gbMax);
  analogWrite(bluePin, gbMax);

}

Now I just have to control brightness and replicate that experience 24 times. Easy!


Proposed Project
My final project will be a customizable piece of art for guests of my apartment to configure and set. The device will be a 12" x 12" plexiglass "picture" that will hang on a wall, like a piece of art (I may also go with circular instead of square, in which case the radius will be 6"). The plexiglass will have 24 evenly spaced LEDs around the perimiter. The wiring to the LEDs will extend from the bottom of the picture, into a control box on the floor, containing 4 microcontrollers and the power supply. Connected to the control box by means of a 6' cable will be the user interface, a clear plastic "controller." My initial plan for the controller is that it will be shaped like a fat pancake, with a radius of approximately 4". The four sides of the controller will be movable, so that each side may be rotated 180 degrees and expanded outwards 2". Rotating the sides will adjust the hue of the respective side off the picture, and moving the sides outwards will adjust the brightness. There will be a locking mechanism, so that once the user has the panel configured how they would like it, the lights will stay in that setup until the lock is reset. Here's a detailed drawing.

Drawing:



Midterm Project

Week 1: Observation
I stalked around a bit and tried to watch the people who live in my building as they exited our building. I was looking for actions such as checking for keys or patting of pockets. I also followed my roommate a few times when he left to go get groceries. Since we hang out quite a bit anyways, it was not conspicuous to watch his behavior, though my presence no doubt affected it. The only consistent behavior I noticed is that people do not give much notice to the act of leaving the building. We have a lot of homeless people on our block, and the only time my roommate even spoke aloud when we exited the building was to remark on how great it was the few times there was no one sitting on the stoop.


The physical characteristics of our medium are the door and the user, and their interaction. The physical input is the user turning the knob to open the door.


Week 2: Prototyping
We've got the design for our alert system completed, we're just waiting on getting the parts now. We've got a magnetic door switch to turn the system on when the door is opened as well. We're going to use low frequency RFID for the proximity detection of the keychain. We're currently looking at buying these from Texas Instruments: The Keyring Tag and the Micro Reader


Week 3: More Prototyping
We almost completely lost our minds this week trying to get our RFID readers to work. After many failed days and attempts with the Texas Instruments reader, we gave up and moved on to the Parallax reader so we would have something to show for class. The range is not great, and would not make a functional product, but the idea is evident from the prototype.


Week 4: Final Midterm
So we're back with the TI reader, having found out that all of our issues were due to a faulty chip. That's pretty irritating. The loop() function of the arduino was giving us some issues because the chip wants to keep using that loop and will not allow a separate while() to run exclusively. We spent several nights on and off working on code, and finally have a nice looking midterm, with a tupperare enclosure!




Observation Assignment


Tuesday, September 19. 3:00 pm. Washington Square Park

Notes
- The user's headphones remained plugged in.
- The user alternated between periods of continuous use and periods of staring with her left hand on her face.
- The user always used her right index finger, which moved in short, smooth arcs across the touch pad.
- The movement of the index finger was typically around 5 quick movements in a row, then a tap or two, then several seconds of rest.
- Sample period: 5 movements, 2 taps, 8 seconds rest, 2 movements, 3 seconds rest, 11 movements, 2 taps, 2 seconds rest.
- The user's feet tapped in an alternating pattern throughout the entire time of use.
- When the user clicked the mouse button, she did not click with her right thumb, but rather clicked with her left index finger as she used the touchpad with her right index finger.




Lab Notes
Lab 1
3. Components in series: They did not burn out because the resistance they create is equal to that of the 220 ohm resistor? When I added a third they did not light up, I'm guessing it is because the resistance from each LED removed too much voltage.





Lab 2
Took a bit to get the chip programmed, but no problems whatsoever once the program was on it.





Lab 3
Personal Note: The

potValue = analogRead(potPin); // read the pot value

line of code reads in the varying Voltage from the potentiometer, not the varying resistance.


No problems on this lab




Lab 4: Servo/analog out

No problems on this lab




Lab 5: Serial output and Talking to Processing

I used two potentiometers, because I figured they would be the most reliable. I need to pick up a few flex resistors soon. (Personal note: Why do flex resistors not have 3 prongs?)



Success!




Lab 6: Controlling a motor

I finally got a DC motor from RadioShack, though the damn thing is rather large (it's 9v). It says it draws 1.98 mA, which is more than my converter puts out; this should be entertaining (It turned out not to be a big deal). Also, using only 5v was fine, even though it is rated for 9-13. Everything worked and the switch reversed the polarity. Super coolness





Lab 7: Talking to a MIDI Device

This one turned out to be a bit more difficult because the MIDI adapter drawings did not specify which side they were labeling. After solving that bit of confusion all was good.

\\

Edit - History - Print - Recent Changes - Search
Page last modified on December 13, 2006, at 11:30 PM