Students/Tiffany Lee

From Robert-Depot
Jump to: navigation, search
from Robert-Depot, ICAM 147a 2010

Tiffany Lee (English: Taiwan, Portuguese: Formosa, Chinese: 台灣) is majoring in ICAMajor with a Visual Art Emphasis. She has no previous experience with electronics and is taking the class because she liked what she read in the visual arts brochure. Tiffany Lee's career goals is in computer animation, both 2-D and 3-D and would like to live in Seattle. She is an ICAMajor because she did not do enough research and thought that the major was geared towards computer animation and computer graphics.

Data

Tiffany Lee is a junior from Sixth College and is originally from the Los Angeles area. She has never been arrested and has no criminal record. Her daily diet consists of Chai latte's and Peanut Butter and Banana Sandwich with tapatio. She sleeps two times a day, four hours each, making a healthy total of eight hours. She also doesn't like to move so her hobby is to sit very still. Tiffany Lee keeps herself looking the same by splitting apart like an amoeba every couple centuries. In her current skin she is 162 years old.

Skills

  • Photoshop
  • After Effects
  • Flash
  • Markers
  • 3D MAX
  • Oil Painting

Pokemon Lineup

  • Gengar
  • Dragonite
  • Mewtwo
  • Mew
  • Articuno
  • Dugtrio

What be your line up?

Midterm Proposal

The Visuals/Diagram of how it works

The Phoebe: Due to the increasing number of people without jobs, the down turning economy, and the amount of reading about society's obsession with their possessions, I would like to add to the market another object of desire: a human night lamp. This dress that I would like to make will be either in a white color or a beige color so that the glowing lights that I would like to install underneath can shine through. There will be ruffles underneath to obstruct some of the lights to create silhouettes so that the light is now overwhelming to the eye. The switch will be a string much like an old school lamp. I am not really quite sure the way I would hook up the lights to an electric source, but I was thinking it would be through a relay because of it’s on and off capabilities. It would be nice to be able to utilize batteries so that the dress is self efficient and can glow anywhere.







Final Project

Idea

Most people usually check their emails once a day and often times emails, especially messages regarding the day it was sent, are missed. This project proposal attacks this problem that I especially have as well by utilizing the Arduino Board and the easy to write Python programming scripts to make a physical email notifier. I myself have three email accounts that I regularly regard as important email accounts and so I will create three panels with different colored LED lights in them to represent these email accounts. Looks wise I will design them based on Apple's design on their Macbook laptop cover. When one email account receive an email, the LED light will start pulsating.

This project, I realize, will have to use another program that can check emails and talk to Arduino. I have found many tutorials about Python and Arduino on the Arduino website, it seems like Python is like Processing except less on the graphics and more programming. Arduino and Python talk to each other by using Pyserial to talk to the port.

Illustration and Diagram

TWO

Final Project Documentation

Photographs

TSE

I pretty much soddered the LED and the 150 ohm resistors on a piece of cardboard and then covered it with foil so that the LED lights can bounce around the foil to make it brighter.

Fruit2.JPG

I spraypainted cardboard with Krylon Silver and foiled the inside. I used harder paper and wax paper for the front.

Fruit3.JPG

To hide the Arduino board, I spraypainted a small box I made from cardboard and used a smile face stencil I made. But it felt kind of empty so I used a silver gel pen and just doodled across.


Projectd 004.JPG

In the Python Command Line, because i needed to know if it was actually running, I typed out print commands to tell me what stage the code is on. I also needed to know when the connection is closed. It would be nice if I could figure out how to start it up when my computer logs in though.


Python Code

From what I can read. This code seems to access gmail through atom feed, reads each line, finds a specific word in the code of gmail, and that's how it understands how many emails you have. I think that specific word is \d+, now if one day google decided to change this, I don't think this code will work anymore. You will want to execute the Python files through its command line because Pythonwin is terrible at running through tests unless you are stepping in. Things right by the number symbol are actually comments.


import urllib2, re, serial, sys, time
#Serial port for USB, FOR PC'S, mine is 3, and on Arduino it is read as COM4. 
SERIALPORT=3
#Gmail Account Details, this is only for GMAIL by the way. 
USERNAME1="EMAIL@EMAIL.COM"
PASSWORD1="PASSWORD"
USERNAME2="EMAIL@EMAIL.COM"
PASSWORD2="PASSWORD"
USERNAME3="EMAIL@EMAIL.com"
PASSWORD3="PASSWORD"
PROTO="http://"
SERVER="mail.google.com"
PATH="/gmail/feed/atom"
   
while True:
   print "checking email"
   
   #get Atom feed 1
   passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
   passman.add_password(None, SERVER, USERNAME1, PASSWORD1)
   authhandler = urllib2.HTTPBasicAuthHandler(passman)
   opener = urllib2.build_opener(authhandler)
   urllib2.install_opener(opener)
   page = urllib2.urlopen(PROTO + SERVER + PATH)
   #mail count line
   for line in page:
       count = line.find("fullcount")
       if count > 0: break
   newmails1 = int(re.search('\d+', line).group())


   #get Atom feed 2
   passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
   passman.add_password(None, SERVER, USERNAME2, PASSWORD2)
   authhandler = urllib2.HTTPBasicAuthHandler(passman)
   opener = urllib2.build_opener(authhandler)
   urllib2.install_opener(opener)
   page = urllib2.urlopen(PROTO + SERVER + PATH)
   #mail count line
   for line in page:
       count = line.find("fullcount")
       if count > 0: break
   newmails2 = int(re.search('\d+', line).group())
   #newmails2 = 0
   #get Atom feed 3
   passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
   passman.add_password(None, SERVER, USERNAME3, PASSWORD3)
   authhandler = urllib2.HTTPBasicAuthHandler(passman)
   opener = urllib2.build_opener(authhandler)
   urllib2.install_opener(opener)
   page = urllib2.urlopen(PROTO + SERVER + PATH)
   #mail count line
   for line in page:
       count = line.find("fullcount")
       if count > 0: break
   newmails3 = int(re.search('\d+', line).group())
   #newmails3 = 0
   newmails = newmails1 + newmails2 + newmails3
   print "number of new emails:", newmails
   if newmails > 0:
       try:
           ser = serial.Serial(SERIALPORT, 57600)
           print "connection open "
           time.sleep(1.5)
           #all emails have new mails
           if newmails1>0 and newmails2>0 and newmails3>0:
               print "A is sent"
               msg = 'A'
           #mail 2 has mail
           elif newmails1 == 0 and newmails2 > 0 and newmails3 == 0:
               print "B is sent"
               msg = 'B'
           #mail 1 has mail
           elif newmails1 > 0 and newmails2 == 0 and newmails3 == 0:
               print "C is sent"
               msg = 'C'
           #mail 3 has mail
           elif newmails1 == 0 and newmails2 == 0 and newmails3 > 0:
               print "D is sent"
               msg = 'D'
           #mail 1 and 2 has mail
           elif newmails1 > 0 and newmails2 > 0 and newmails3 == 0:
               print "E is sent"
               msg = 'E'
           #mail 2 and 3 has mail
           elif newmails1 == 0 and newmails2 > 0 and newmails3 > 0:
               print "F is sent"
               msg = 'F'
           #mail 1 and 3 has mail
           elif newmails1 > 1 and newmails2 == 0 and newmails3 > 0:
               print "G is sent"
               msg = 'G'
           ser.write(msg)
           print "sending data "
           time.sleep(3)
           ser.close()
           print "connection close "
           time.sleep(1)
       except serial.SerialException:
           #sys.exit()
           #print"something bad happens \n"

break

   else :

time.sleep(1)

 print "program ended\n"

Arduino Code

/*
Gmail Notifier
This example shows how to fade an LED using the analogWrite() function. It is programmed to talk to Python through PySerial.
Pin 9, 10, and 11 is where the LED's are connected. 

Created 1 Nov 2008
By David A. Mellis
Modified 17 June 2009
By Tom Igoe
Further Modified 18 March 2010
By Tiffany Lee

http://arduino.cc/en/Tutorial/Fading

*/
int ledPin1 = 9;    // LED connected to digital pin 9
int ledPin2 = 10;   // LED 10
int ledPin3 = 11;   // LED 11
int mail1 = LOW;    // is there new mail? LOW : No
int mail2 = LOW;
int mail3 = LOW;
int val;            //Value read from teh serial port
void setup()  { 
 pinMode(ledPin1, OUTPUT);  //sets the digital pin as output
 pinMode(ledPin2, OUTPUT);
 pinMode(ledPin3, OUTPUT);
 Serial.begin(57600);       
 Serial.flush();
}  
void loop()  { 
 
 //Read from serial port
 if(Serial.available())
 {
   val = Serial.read();
   Serial.println(val);
//IF ALL EMAILS HAS MAILS
   if (val == 'A')
    { 
      mail1 = HIGH;
      mail2 = HIGH; 
      mail3 = HIGH;
      // fade in from min to max in increments of 5 points:
     for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) 
     { 
   // sets the value (range from 0 to 255):
       analogWrite(ledPin1, fadeValue); 
       analogWrite(ledPin2, fadeValue);
       analogWrite(ledPin3, fadeValue);      
   // wait for 30 milliseconds to see the dimming effect    
       delay(30);                            
      } 
   // fade out from max to min in increments of 5 points:
     for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) 
     { 
   // sets the value (range from 0 to 255):
       analogWrite(ledPin1, fadeValue);  
       analogWrite(ledPin2, fadeValue);
       analogWrite(ledPin3, fadeValue);    
   // wait for 30 milliseconds to see the dimming effect    
       delay(30);                            
      } 
    
    }
   //mail 2 HAS EMAIL
   else if ( val == 'B') 
     {
       mail1 = LOW; 
       mail2 = HIGH ; 
       mail3 = LOW;
   // fade in from min to max in increments of 5 points:
       for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) 
       { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin2, fadeValue);
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
   // fade out from max to min in increments of 5 points:
       for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin2, fadeValue);
     
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
     }
   //MAIL1 has emails
   else if ( val == 'C') 
     { 
       mail1 = HIGH; 
       mail2 = LOW; 
       mail3= LOW; 
       // fade in from min to max in increments of 5 points:
       for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) 
       { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin1, fadeValue); 
  
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
   // fade out from max to min in increments of 5 points:
       for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) 
       { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin1, fadeValue);  
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
     
     }
   //MAIL3 HAS EMAILS
   else if ( val == 'D') 
     {
       mail1 = LOW; 
       mail2 = LOW; 
       mail3 = HIGH;
       // fade in from min to max in increments of 5 points:
       for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) 
       { 
         // sets the value (range from 0 to 255):
         analogWrite(ledPin3, fadeValue); 
  
          // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
   // fade out from max to min in increments of 5 points:
       for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) 
       { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin1, fadeValue);  
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
     
   }
  //MAIL 1 and 2 have emails.
   else if (val == 'E') 
     {    
       mail1 = HIGH;
       mail2 = HIGH; 
       mail3 = LOW;
       // fade in from min to max in increments of 5 points:
       for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) 
       { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin1, fadeValue); 
         analogWrite(ledPin2, fadeValue);
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
   // fade out from max to min in increments of 5 points:
       for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin1, fadeValue);  
         analogWrite(ledPin2, fadeValue);
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
     }
  //Emails 3 and 2 have emails.
   else if ( val == 'F') 
     {mail1 = LOW; mail2 = HIGH; mail3 = HIGH;
     // fade in from min to max in increments of 5 points:
       for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5)
       { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin2, fadeValue);
         analogWrite(ledPin3, fadeValue);      
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
   // fade out from max to min in increments of 5 points:
       for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin2, fadeValue);
         analogWrite(ledPin3, fadeValue);    
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);         
 
       }
     }
   //only emails 1 and 3 have emails. 
   else if ( val == 'G') 
     {
       mail1 = HIGH; 
       mail2 = LOW; 
       mail3= HIGH;
       // fade in from min to max in increments of 5 points:
       for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin1, fadeValue);
         analogWrite(ledPin3, fadeValue);      
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
       } 
   // fade out from max to min in increments of 5 points:
       for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { 
   // sets the value (range from 0 to 255):
         analogWrite(ledPin1, fadeValue);
         analogWrite(ledPin3, fadeValue);    
   // wait for 30 milliseconds to see the dimming effect    
         delay(30);                            
     } 
 
}
  //actually this isn't used because in Python if there is no emails, the CPU sleeps for 1 second before checking again. 
   else if ( val == 'N')
   {
     mail1 = LOW; 
     mail2 = LOW; 
     mail3= LOW;
   }
 }
}

Field Research

TWO
ONE
THREE
FOUR
FIVE