Updates from YiNing Toggle Comment Threads | Keyboard Shortcuts

  • YiNing 4:41 am on December 13, 2012 Permalink | Reply  

    Finally – You Are What You Eat 

    Some people say “You are what you eat”. I agree with this quote. Somewhere in our body may have the thing that we obtained from the food we ate.

    I am always grateful for those animals (or even vegetables) with which sacrificed their lives to feed us. So we survive. Without those food we may die out of hunger and have no heart beats.

    I decided to simulate our pulse and apply it to a piece of meat.
    I use two arduinos because I want to show the “distance”  between the human and the food. One is for transmitting the pulse signal, another is for receiving the signal and do the commands. One the receiving side, I put one red LED, one vibration motor, one battery and some antennas. As the result the food part can be a stand alone object.

    This is the receiving bag:
    prep05

    and then I bought some steaks (I don’t normally buy meat, but because of this project…):
    prep01

    I wrapped the meat around the bag and sew the edges:
    prep02

    This is the video of how it works:

     
  • YiNing 6:17 pm on November 16, 2012 Permalink | Reply  

    Assignment: sound/LED controls 

    code here:

    int state;
    void setup(){
      pinMode(9, OUTPUT);
      pinMode(2, OUTPUT);
      pinMode(12, INPUT);
      state = 1;
      Serial.begin(9600);
    }
    
    void loop(){
      int pot = analogRead(A3);
      int photo = analogRead(A1);
      int potLight = map(pot, 0, 1024, 0, 255);
      int photoLight = map(photo, 0, 1024, 0, 255);
      int photoSpeaker = map(photo, 0, 1024, 500, 80);
      int potSpeaker = map(pot, 0, 1024, 80, 500);
      int potDelay = map(pot, 0, 1024, 0, 500);
      int photoDelay = map(photo, 0, 1024, 0, 500);
      
      boolean btnRead = debouncefunction(12);
      if(btnRead == true){
       btnRead = 0;
       delay(200);
       state += 1;
         if(state > 4){
           state = 1;
         } 
      }
        
      if(state == 1){
        //state one pot->LED, photosensor->speaker
        analogWrite(9, potLight);
        tone(2, photoSpeaker);
      }
      
      if(state == 2){
        //photoell->LED, pot->speaker
        analogWrite(9, photoLight);
        tone(2, potSpeaker);
      }
      
      if(state == 3){
        // photocell->LED/speaker, pot->speaker tone and led blink rate
        tone(2, potSpeaker);
        delay(photoDelay);
        noTone(2);
        delay(photoDelay);
        analogWrite(9, photoLight);
        delay(potDelay);
        analogWrite(9, 0);
        delay(potDelay);   
      }
      
      if(state == 4){
        analogWrite(9, photoLight);
        delay(photoDelay);
        analogWrite(9, 0);
        tone(2, potSpeaker);
        delay(photoDelay);
      }
     
      Serial.println(state);
    }
    
    int debouncedelay = 500;
    boolean debouncefunction(int pin){
      boolean state;
      boolean previousState;
      
      previousState = digitalRead(pin);
      for(int counter =0; counter > debouncedelay; counter++){
        delay(1);
        state = digitalRead(pin); //readpin
          if(state != previousState)
          {counter = 0;
          previousState = state;
          }
      }
      return state;
    }
    
     
  • YiNing 2:04 am on November 9, 2012 Permalink | Reply  

    My Arduino Simon 

    YiNing's Arduino Simon
    I used some soft materials to wrap and form my Simon. Inside the white fabrics are two pieces of wooden oil paint canvases that contain my Arduino board, speaker, vibration motor, LEDs, and battery.
    My circuit broke when I was about to do user testing today. I will schedule another time to test and document it.

    User test:

     
  • YiNing 5:33 pm on October 19, 2012 Permalink | Reply  

    My Simon Says not working code… 

    this is YiNing’s not working Simon code….

    boolean simonDone;
    int simonSays[99] ={};
    int user[99] = {};
    int nextStep = 0 ;
    int usernextStep = 1;
    
    int simonSpeed = 500;
    int ledpin[4] = {};
    int btnpin[4] = {};
    int count = 0;
    
    int debouncedelay = 10;
    boolean debouncefunction(int pin){
      boolean state;
      boolean previousState;
    
      previousState = digitalRead(pin);
      for(int counter =0; counter > debouncedelay; counter++){
        delay(1);
        state = digitalRead(pin); //readpin
          if(state != previousState)
          {counter = 0;
          previousState = state;
          }
      }
      return state;
    }
    
    void setup()
    {
      for(int i = 4; i < 8; i++){
        pinMode(btnpin[i], INPUT);
      }
    
      for(int i =8; i < 12; i++){
        pinMode(ledpin[i], OUTPUT);
      }
    
      Serial.begin(9600);
      randomSeed(analogRead(0));
    }
    
    void loop ()
    {
      if (simonDone == false)
      {
        simonSays[nextStep] = int(random(1,5)) ;
        Serial.print("nextStep: " );
        Serial.println(nextStep);
    
        Serial.print("simonSpeed: " );    // Show how the new time feature works
        Serial.println(simonSpeed);         // Show how the new time feature works
    
        Serial.print("simonSays: ");
    
        for (int i =0; i <= nextStep ; i++)
        {
          Serial.print(simonSays[i]);
          Serial.print(" , ");
        if(simonSays[i] == 1){
          digitalWrite(8, HIGH);
          delay(300);
          digitalWrite(8, LOW);
        }
        if(simonSays[i] == 2){
          digitalWrite(9, HIGH);
          delay(300);
          digitalWrite(9, LOW);
        }
        if(simonSays[i] == 3){
          digitalWrite(10, HIGH);
          delay(300);
          digitalWrite(10, LOW);
        }
        if(simonSays[i] == 4){
          digitalWrite(11, HIGH);
          delay(300);
          digitalWrite(11, LOW);
        }
          delay(simonSpeed);
        }
    
        simonSpeed= (simonSpeed - (nextStep*5));
        simonSpeed = max(simonSpeed, 200);
    
        simonDone = true;
        Serial.println(" ");
      }
    
      if (simonDone == true)
      {
        //delay(3000);
        Serial.println("User's turn");
        Serial.print("User says:  ");
        for(int i = 0; i <= nextStep; i++){
          boolean wait = true;
          if(user[i] != 1 || user[i] != 2 || user[i] != 3 || user[i] != 4){
            if(wait == true) {
              for(int i = 0; i <count+1; i++){
              delay(count);
              count++;
              }
            }
          }
          if (digitalRead(4) == HIGH){
            wait = false;
            Serial.print("1");
            user[i] = 1;
            delay(200);
          }
          if (digitalRead(5) == HIGH){
            wait = false;
            Serial.print("2");
            user[i] = 2;
            delay(200);
          }
          if (digitalRead(6) == HIGH){
            wait = false;
            Serial.print("3");
            user[i] = 3;
            delay(200);
          }
          if (digitalRead(7)== HIGH){
            wait = false;
            Serial.print("4");
            user[i] = 4;
            delay(200);
          }
          if (user[i] == simonSays[i]){
            //usernextStep ++;
            Serial.print(" , ");
            //if(usernextStep == nextStep + 1){
              Serial.println("User got it right, add a new step and give Simon a Turn");
              simonDone = false;
            //}
          }
        }
        nextStep++;
      }
    }
    
     
  • YiNing 5:27 am on October 12, 2012 Permalink | Reply  

    My Simon style games ideas, enclosures ideas, and sound code. 

    This are my thee Simon ideas:
    Image

    for the enclosure for the first idea, I am thinking about attaching some parts onto the tip of the drum sticks

     

    for the second idea, I’m thinking about a simple form like below:

     

    for the third idea, should be simple, a Frisbee will do.

    download my sound code here:
    MY CODE

     
  • YiNing 4:25 am on October 5, 2012 Permalink | Reply  

    Maker Faire 

    Maker Faire was very fun. Much better than what I expected!
    here are three projects I found interesting:

    Image

    Metrocard Man & Robot.
    by Gregory Rodolico

    I thought everyone hates MTA but I might be wrong…  the man decorated his robot and himself with metrocards… I’m actually happy to see someone use the simplest thing that everyone has or recognizes to get people’s attention.

    Image
    Drivable Hammock
    By Sean Ragan

    The guy looks really comfortable everywhere at Maker Faire. Not sure it’s because of the hammock that makes him feel like home or just his easy attitude…

     

    Image
    3D printer
    by UltiMachine

    This was my first time seeing 3D printer and the process of printing. I was really excited. This 3d printer has parts that were 3D printed, which means the machine can replicate itself. This reminds me of the recent article I read from Bill Joy, he said the future machines have the ability to self replicate.

     
  • YiNing 6:11 pm on September 28, 2012 Permalink | Reply  

    First post by YiNing 

    This is  Yi-Ning Huang. 
    My favorite childhood toy is dogs.
    Image
     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel