Final Project: Shoot It! Yumo Yao (Leon)

Shoot It!

This is a shooting game, which is to shoot down the planes by controlling the cannon. There are two different kinds of planes, respectively worth 100 and 200 credits. The credit depends on the size of the plane, which means the difficulty of shooting it. When one plane is hit, the speed will be higher, and five bullets will be added. However, if the number of the bullets is more than fifteen, then it will automatedly add to full. Also, the user can control the speed of the plane, which decides the difficulty of the game. When the total twenty bullets run off, the game is over.

the video clip: https://drive.google.com/open?id=14-D-TCWauEAE4W2uLHVoCTsQgJMT4kBN

inspirations:

The inspiration comes from a famous casual game in WeChat. The user should control the plane to shoot planes and then avoid being hit by the plane.

This was the origin of the objects of cannon and planes. Another inspiration was the game “flappy birds”, which was really simple but addictive.

Also, I feel that we now need a game that can be finished in a few minutes, so it should be easy to play. Another point is that the game is designed to be focus on all ages, so the thesis should be easy to understand.

Fabrication:

The main point of the game is focused on the Processing part, so the fabrication was quite simple. I was lucky that all the holes were in the right size, so that I didn’t need to remake it like some other people. I used six buttons to control the position, the speed, shooting and restarting.

 

Interactions:

Basically, the interaction happens between the users and the computer, and between the users themselves. Since one user can only control the buttons which control the direction of the movement and the speed, there should be a user two who controls when to shoot. This accidentally solves a bug in the game, which if the game is controlled by a single person, the movement of the cannon will stop if he/ she wants to shoot the plane. This brings tons of joy and according to the trail operation, the users tend to talk a lot and even shout out loud to cooperate with each other.

User test:

During the user test, I received some suggestions which were really helpful. Firstly, add a background picture like a war or a sky, but the whole style of the game is pixel, which is hard to make a background. Thus, I canceled this decision. Secondly, I can add different kinds of planes with different credits, which can make the game more challenging. I actually did this, and it made the whole game more interesting. Thirdly, I think I had misunderstood what the professor said to me. What he said was the background of war may be a little bit sensitive, which might arouse the sad memories of those who have acquaintance injured or died from a battle. It’s a pity that I understand it afterwards, or I might change the thesis into throwing food to pets. what’s more, I added the background music to make it more immersive.

Challenges:

I’ve faced tons of problems when I wrote the code. I learnt the function “class” myself and I tried to use it in the coding. I searched online about games like this, for I had some problems with counting the credits. I got the idea online that I can use an integral called “flag”, which can show the status of the plane, and it can be a bridge between the plane status as well as the credits. This was a critical point of the whole code. Another difficult point was the button debounce. Theoretically, the cannon should shoot once when the button is pushed once. However, a bunch of bullets emerges when the button was clicked once. I asked Leon for help, and he offered two solutions to this problem. Finally, I simply chose the “delay” function, but I learned the way to count time as well.

Improvement:

For the future improvement, I feel like the interaction between the users and the machine should be strengthened, for example, I can use the cameras to detect the light or use some sensors. Also, I should make it wireless and set up a two users mode, which can improve the user experience.

Conclusion:

This is the last project I finished in the interaction lab. I met many incredibly interesting people in IMA, and their creative ideas inspired me a lot. Also, I feel like that all the teaching fellows are so kind, that they are always glad to help me and answer my silly questions. I cherish this wonderful experience.

//use mouse to control the cannon
//mouse click to shoot
//’e’,’q’ to increase or decrease the speed;p shoot
//’r’ to reset
//when you hit the plane, you get 3 bullet and 100 points
// for reward
import processing.serial.*;
String myString = null;
Serial myPort;
int NUM_OF_VALUES = 6;   /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/
int[] sensorValues;      /** this array stores values from Arduino **/
int remain=20;
int credit=0;
int hit=0;
PFont font;
class plane
{
  int x;
  int y;
  int flag;
  int speed;
  int randSeed;
  plane(int x, int y)
  {
    this.x=x;
    this.y=y;
    speed=3;
    flag=-1;
    regenSeed();
  }
  void fly()
  {
    if (flag==-1)
    {
      x+=speed;
      if (x>=600)
      {
        x-=600;
        y=(int)random(20, 300);
        regenSeed();
      }
    }
    if (flag==1)
    {
      flag=-1;
      x=0;
      speed++;
      regenSeed();
    }
  }
  void crash(cannonball c)
  {
    if (dist(x, y, c.x, c.y)<50)
    {
      if (!isTiny())
      {
        credit+=100;
      } else
      {
        credit+=200;
      }
      flag=1;
      hit=1;
    }
  }
  void display()
  {
    if (x<600)
    {
      if (!isTiny())
      {
        //Is a big plane
        fill(20);
        rect(x, y, 60, 20);
        triangle(x, y-20, x, y, x+30, y);
        triangle(x, y+40, x, y+20, x+30, y+20);
        triangle(x+60, y, x+80, y+10, x+60, y+20);
      } else
      {
        //Is a small plane
        fill(255, 0, 0);
        rect(x, y, 30, 10);
        triangle(x, y-10, x, y, x+15, y);
        triangle(x, y+20, x, y+10, x+15, y+10);
        triangle(x+30, y, x+40, y+5, x+30, y+10);
      }
    }
  }
  void regenSeed()
  {
    this.randSeed=(int)random(0, 100);
  }
  boolean isTiny()
  {
    return this.randSeed>20;
  }
}

class cannonball
{
  int x;
  int y;
  int flag;
  cannonball()
  {
    x=600;
    y=600;
    flag=1;//can be fired
  }
  void fire(int x, int y)
  {
    this.x=x;
    this.y=y;
    flag=-1;//fired
  }
  void fly()
  {
    if (flag==-1) {
      y-=5;
    }
  }
  void display()
  {
    if (y<600)
    {
      fill(100);
      ellipse(x, y, 20, 20);
    }
  }
}
class cannon
{
  int x;
  int a = 300; //STARTING POS
  cannon(int x)
  {
    this.x=x;
  }

  void display()
  {
    printArray(sensorValues);

    if (sensorValues[0]==0) {
      a=a-5;
    } 
    if (sensorValues[1]==0) {
      a=a+5;
    }
    fill(0);
    rect(a-5, 580, 40, 20);
    rect(a+5, 560, 20, 40);
  }
  void fire(cannonball c)
  {
    c.fire(a, 580);
  }
}
cannon a=new cannon((int)random(20, 500));
cannonball[] c=new cannonball[20];
plane p=new plane(0, (int)random(20, 200));

int prevFrame = 0;
int counter;

void setup()
{
  size(600, 600);
  setupSerial();
  smooth();
  background(255);
  for (int i=0; i<20; i++)
  {
    c[i]=new cannonball();
  }
}

 

void draw()
{
  
  //if (frameCount - prevFrame > 60) {
  
  //  counter = counter + 1;
  //  prevFrame = frameCount;
  
  //}
  //println(counter);
  
  updateSerial();
  printArray(sensorValues);
  background(255);
  
    if  (sensorValues[5]==0){  
    int i=0;
    for (i=0; i<20; i++)
    {
      if (c[i].flag==1) break;
    }
    if (i==20) return;
    a.fire(c[i]);
    remain --;
  }
  
  if (sensorValues[4]==0)
  {
    remain=20;
    credit=0;
    for (int i=0; i<20; i++)
      c[i]=new cannonball();
    p.flag=-1;
    p.speed=3;
  }
  if (sensorValues[2]==0) p.speed+=3;
  if (sensorValues[3]==0)
  {
    if (p.speed<=3) return;
    else p.speed-=3;
  }
  
  a.display();
  for (int i=0; i<20; i++)
  {
    if (c[i].flag==-1)
    {
      c[i].fly();
      c[i].display();
    }
  }
  for (int i=0; i<20; i++)
  {
    p.crash(c[i]);
  }
  p.fly();
  p.display();
  if (hit==1)
  {
    hit=0;
    int j=5;
    for (int i=0; i<20; i++)
    {
      if (c[i].flag==-1)
      {
        c[i]=new cannonball();
        j--;
        remain++;
        if (j==0) break;
      }
    }
  }
  textSize(20);
  text("remain: "+remain, 450, 50);
  text("credit: "+credit, 450, 100);
  if (remain==0)
  {
    textSize(50);
    text("run out of ammo…", 100, 150);
    text("final score is: "+credit, 100, 220);
    text("press the green button to restart..", 100, 280);
  }
}

void setupSerial() {
  printArray(Serial.list());
  myPort = new Serial(this, Serial.list()[2], 9600);

  myPort.clear();
  myString = myPort.readStringUntil( 10 );  
  myString = null;

  sensorValues = new int[NUM_OF_VALUES];
  delay (150);
}

void updateSerial() {
  while (myPort.available() > 0) {
    myString = myPort.readStringUntil( 10 ); // 10 = 'n'  Linefeed in ASCII
    if (myString != null) {
      String[] serialInArray = split(trim(myString), ",");
      if (serialInArray.length == NUM_OF_VALUES) {
        for (int i=0; i<serialInArray.length; i++) {
          sensorValues[i] = int(serialInArray[i]);
        }
      }
    }
    //delay(150);
  }
}

Week 9: Serial Communication, Yumo Yao (Leon)

For the recitation project of this week, I was trying to make a sketch which can be controlled by Arduino. I was kind of inspired by this picture, which a bunch of circles emerge randomly, giving out a beautiful scene.

I was trying to make it solid but a little transparent, but I feel like I cannot make it as beautiful as the picture shows. The color seems to be wired and ugly. Thus, I searched on the internet again, focusing on the beauty of circles.

I realized that the whole frame will be better if I make the picture simply black and white.

I simply used the function of “ellipse” and make the radium a random number. Also, I control the x-value and the y-value of the circles by the value of potentiometer.

Serial communication was a critical point of this project. I should only add some lines in the Processing code, in order to read the statistics from the Arduino. Also, I have to use commas to split different number, and make sure that it will simply read the number between two commas once.

Everything seemed to be going on well, but when I tried to plug in the wire, it always showed that there was an error called port busy. I redid that for many times, but I still could not solve this problem. I asked one of the teaching fellows for help, and she just told me that I should start Arduino first before I run the code of processing. And I have to wait until it is loaded in Arduino. Thus, the problem was solved, and I finally got the expected sketch.



import processing.serial.*;

String myString = null;
Serial myPort;


int NUM_OF_VALUES = 2;   /** YOU MUST CHANGE THIS ACCORDING TO YOUR PROJECT **/
int[] sensorValues;      /** this array stores values from Arduino **/


void setup() {
  size(500, 500);
  background(0);
  setupSerial();
}


void draw() {
  updateSerial();
  printArray(sensorValues);
  int r = int (random(0,255));
  ellipse(sensorValues[0], sensorValues[1],r,r);
  stroke(255);
  noFill();

  // use the values like this!
  // sensorValues[0] 

  // add your code

  //
}



void setupSerial() {
  printArray(Serial.list());
  myPort = new Serial(this, Serial.list()[2], 9600);
  // WARNING!
  // You will definitely get an error here.
  // Change the PORT_INDEX to 0 and try running it again.
  // And then, check the list of the ports,
  // find the port "/dev/cu.usbmodem----" or "/dev/tty.usbmodem----" 
  // and replace PORT_INDEX above with the index number of the port.

  myPort.clear();
  // Throw out the first reading,
  // in case we started reading in the middle of a string from the sender.
  myString = myPort.readStringUntil( 10 );  // 10 = 'n'  Linefeed in ASCII
  myString = null;

  sensorValues = new int[NUM_OF_VALUES];
}



void updateSerial() {
  while (myPort.available() > 0) {
    myString = myPort.readStringUntil( 10 ); // 10 = 'n'  Linefeed in ASCII
    if (myString != null) {
      String[] serialInArray = split(trim(myString), ",");
      if (serialInArray.length == NUM_OF_VALUES) {
        for (int i=0; i<serialInArray.length; i++) {
          sensorValues[i] = int(serialInArray[i]);
        }
      }
    }
  }
}

Final Project Proposal Essay,Yumo Yao (Leon)

A.    Project Title

HIT IT!

B.    Project Statement of Purpose

The project is a game for all ages. The game is simple, which is basically about the user controlling the canon and try to hit the plain with the bullet. I was inspired from one of a simple mobile game that was really famous several years ago, and since that game was simply played on the phone, I want to enforce its interactive part by adding some physical stuffs. Generally, my challenge is to find a attractive game for all ages, and it can make people be addicted. For the audience, because the game is small, and without any complicated design, it can easily be used in the spare time for relax. It should bring lots of joy to people, and it should be promoting the relationship between two people, for there will be double players mode.

C.    Project Plan

The project is about a game that the player can control the position of the canon, and they can fire at whenever they want to shoot the randomly flying plane. To control, there will be a handle and a button. I may add the multi-players mode into the game, so that there will be more handles and buttons to control where the plane should be and when it should shoot. To analyze the need of the user group, I should try some games with similar themes and method, so that I can focus on the image design part as well as the user experience, so that I can make it more interesting and attractive. As I’ve finished a simple version in processing, in the next few weeks, I will first focus on the user experience, for which I will add some music, as well as some animations, and I will make the image more ingenious. After that, I will connect it with Arduino, so that it can connect with a physical interactive part. I am still hesitating that whether I should use a button or a paddle, and I think a paddle will be better. Anyway, I have to try on different materials and equipment so find the most suitable one. The I will try to make the game more sophisticated by adding a hard mode, as well as multi-player mode.

D.    Context and Significance

I was inspired by the game before, for I was really addicted to that game on my phone when it was first published. I was so surprised that a simply designed game can attract so many people, and some had even been playing it for half a day. The development is that I add the multi-player mode, and the player can change the grade of difficulty. Also, the physical interaction should be highlighted as well. Playing this game may only take a few minutes, so that it can be suitable for everyone, even for those busy people. It provides, short but deep relax for them. For the further projects, they will be more focused on the user experience, so that a more beautiful game interface will be shown.

week 9: final project research, Yumo Yao (Leon)

A. Go back to your definition of interaction as you defined during the group project. How has your work in this course involved that definition?

At that time, my definition of interaction was input, processing and output. I was influenced by the article about the definition of interaction in the reading of week one. I felt like interaction is a kind of reaction that would easily happen in our daily life. Our group misunderstood the requirement at first, so we were trying to make a physical interactive stuff with something like gears. When we realized that we had to present it with our own performance, the time was not enough at all. So we added a situation that in the future when the environment get worse, there will be a box storing the plants and the green. When the user get close to the box, the lid will autonomously open and the plant will rise up, producing some certain perfume. This was the interaction that the input was the user’s coming close, and after the processing by the mechanism inside, the perfume and the exposed plants was the output.

 

B. Based on the initial definition of and your experience developing and executing your midterm project, how has your definition of interaction involved? Be as specific as possible.

My midterm project was Major Fitting Clip, which measures the user’s heart rate, therefore we can tell that whether the user is truly interested in that major. According to my definition of interaction, the first thing that appeared in my mind was using sensors. When the sensor get the information from people, they can give out some other signals such as light or sound. So we chose heart rate sensor. Then we felt like that true interaction should be useful for the users but not meaningless, so we add a theme to it, which is measuring whether the major fits the user.

 

C. Research two other interactive projects, one that aligns with your definition of interaction and one that differs from it.
Discuss why the first project lines up with your definition and why the second one clashes with your definition of interaction. Be precise, as always. In your research process, you are strongly encouraged to consider interactive projects and experiences drawn from and in a variety of sources, media, materials, formats, etc.
The one project that I really like is ChineseWhispers – Inaccurately transmitted gossip. This project, based on Arduino, includes 4 rotating heads made of plastic arranged in a row. There is a speaker is the mouth of each head, and the design emphasizes the speaking and listening part of the head. When the operator says something to the first head, it will turn to the next head and repeat what the operator says. Then the second would turn to the third one, the third to the fourth. The most interesting part is that the conversation between the first and the second head sounds like the words of the human beings, but when the words spread further, the tune sounds higher and sharper. Especially the conversation between the third and the fourth one is too sharp to recognize the content, and the sound is harsh and strident. I like this one so much because the idea of the design really touches me. So terrifying it is that the rumor would change into a worse one after several times of transmitting. This idea seems to be widely known, but it is hard to present this simple idea in an interactive way. This includes interaction between human and machine as well as the interaction between different parts of a machine. The interaction makes the point clear and interesting.
The one project that I dislike is Face Trade – Art vending machine that trades mugshots for “free” portraits. This machine would scan the face of user and make an abstract portrait painting according to the picture it scanned. I do not like it because I couldn’t figure out the connection between the human face and the painting, and there is no similarity between them. Also, it mentioned that the machine would do it for free as long as you agree to keep your facial image in the machine permanently. I think this is kind of violating the privacy of the user. Generally, this interaction seems to make no sense.

 

D. Write a “new” definition of interaction in your own words. Draw from your account above and try to evolve your definition beyond the current convention. It should be polished and professional: imagine it will be printed on IMA Interaction Lab’s next course syllabus!
This definition should reflect the evolution of your understanding of interaction through both the above research and analysis process as well and your semester engagement with course readings, discussions and work.
Your definition may not replicate something you have read. You are an original, you will arrive at this semester’s end with an understanding and practice of interaction of your own—not others’—making!
Again, as in every step, be specific, give details.

For me, interaction is more like a circle, that the process of imputing, processing and outputting goes on and on. It’s the communication based on human, so that it should be meaningful for human beings. through the whole process of human-human communications or human-machine communications, every part of the communication should be fully involved.

week 8: recitation, Yumo Yao (Leon)

I was attracted by the code ”random.” I feel like that it always gives me lots of surprises, such as unknown color, unknown size, etc. So I chose random color for the animation of this recitation, and random color is the most interesting one, so I chose that. I changed the color of the three squares, and I let it print “Interesting!” when there’s some certain connection between different colors. I would like to make it print when the color is really close, so the standard of close colors is the difference value of r/b/g values. If the difference values are all under 30, then we can say that these colors are close.

However, there is one problem that I cannot solve even after turning to my friends for help. When I press the keyboard, I found that the color changes many times in a high speed. I couldn’t figure the reason for this, and perhaps I will go for further help.

For the recitation assignment, I was puzzled with the extending and shrinking part. Then I realized that I could make the radius a variable number, and the radius can be smaller when the circle is too large, and go larger when the circle is too small. Another problem is the color. Actually, I couldn’t fully understand the function “colorMode”, so I was trying to figure out another way to solve the question. I discussed with one of my friend from interaction lab course, and we find that as long as we find a function that can wave between two fixed value, then we can use the “map” function. Trigonometric functions can be the best solution. we used “sin” function and it finally succeeded. I still wanted to add some more animations, so I used “keyPressed” function to move the circle.  

float i =50;
int blue=0;
int red=0;
int green=0;
int speed=5;
int a=300;
int b=300;
void setup(){
  size(600,600);
  background(255);
}


void draw(){
  blue=int (map(sin(frameCount*.1+HALF_PI),-1,1,0,255));
  red=int (map(sin(frameCount*.1+HALF_PI+PI),-1,1,0,255));
  green=int (map(sin(frameCount*.1+PI),-1,1,0,255));
  stroke(red,green,blue);
  strokeWeight(10);
  background(255);
  i=i+speed;
  if(i>300){
    speed=-5;
  }
  if (i<50){
    speed=5;
  }
  ellipse(a,b,i,i);
}
void keyPressed(){    
  //if (a<=600 && a>=0 && b<=600 && b>=0){
      if (key==CODED){
      if (keyCode==UP && b>=0){
        b=b-5;
      }
      else if (keyCode==DOWN&&b<=600){
        b=b+5;
      }
      else if (keyCode==LEFT&&a>=0){
        a=a-5;
      }
      else if (keyCode==RIGHT&&a<=600){
        a=a+5;
      }
    //}
  }
}

Week 7: processing, Yumo Yao (Leon)

The inspiration comes from one of the Sol Lewitt’s work, which is Wall Drawing #370. The artist used black and white stripes for the whole drawing. The orientation of the stripes varies, and some of them are horizontal while others are vertical. The different orientations show a specific image, which could be triangle, square, circle, etc. I was inspired because I felt like this image is simple but beautiful. Only with the simplest colors and shapes can the artist made a cool and interesting work.

I was inspired by the black and white stripes, and I planned to do something similar to that. However, when I drew a circle on it, I suddenly realized that I cannot make the edge of the line a suitable arc. I tried a lot times but it always turned out failure. Then I decided to try another picture, which can be easier for me. I kept up using stripes, but I googled the image of the most comfortable color match, which was applied in my design. However, the whole image seemed to be a little empty so that I added some squares onto that. The only connection between my work and the motif was the utility of the black and white stripes.

Drawing in processing can be really useful, especially for some repetitive parts, for it can be simplified by using a fundamental function. Also, for the interactive design, there are functions like mousePressed and keyPressed, etc. Those functions can really help with interactive projects.

 

viod setup(){
size(600,600);
background(50,0,0);

stroke(255,153,153);
rect(100,100,150,150,20);

stroke(46,70,133);
rect(350,100,150,150,20);

stroke(166,219,186);
rect(100,350,150,150,20);


stroke(255,153,153);
strokeWeight(15);
strokeCap(SQUARE);
line(100,130,250,130);
line(100,160,250,160);
line(100,190,250,190);
line(100,220,250,220);

stroke(46,70,133);
strokeWeight(15);
strokeCap(SQUARE);
line(380,100,380,250);
line(410,100,410,250);
line(440,100,440,250);
line(470,100,470,250);

stroke(166,219,186);
strokeWeight(15);
strokeCap(SQUARE);
line(130,350,130,500);
line(160,350,160,500);
line(190,350,190,500);
line(220,350,220,500);





stroke(0,0,0);
strokeWeight(0.1);
fill(188,188,188,150);
rect(175,175,300,300);

stroke(0,0,0);
strokeWeight(0.1);
fill(188,188,188,200);
rect(250,250,225,225);

stroke(0,0,0);
strokeWeight(0.1);
fill(188,188,188,200);
rect(250,250,225,225);

stroke(0,0,0);
strokeWeight(0.1);
fill(188,188,188,200);
rect(175,175,75,75);

stroke(255,153,153,200);
fill(255,153,153,100);
rect(475,475,125,125);

stroke(46,70,133);
fill(46,70,133,100);
rect(475,475,85,85);

stroke(166,219,186);
fill(166,219,186,100);
rect(475,475,45,45);
}























Midterm Project: Yumo Yao (Leon)

NAME

The midterm project is called MAJOR FITTING CLIPS, which is used to test if the tester fits the IMA major or not. The project includes two ear clip heart rates sensors, two LEDs, two motors (connected with flags) as well as some basic Arduino materials such as breadboard, wires. As we are faced with choosing courses for the next term, we found it difficult to decide whether we are interested in a certain major or not. The project aims at helping users to determine majors. The project takes IMA major as an example. The user should look at the picture of Leon and Nick stuck to the box, and the heart rate will be measured. Comparatively, the one who has higher heart rate will have his/her LED on, as will as the flag rotating, which means he/ she is more suitable for the major.

PROJECT STATEMENT OF PURPOSE

The project is to measure the degree of enthusiasm towards IMA. The more the users want to join the fellows on the picture, the more excited them would be. Thus, the heart rate of the user will go higher. This can be regarded as the quantification of the interest of IMA, then we may compare the statistics. In the whole process of solving the issue about determine the major, the project plays an important part, which can transfer the enthusiasm into some physical signals such as lights, sounds and moves. We can have access to our degree of interest in an intuitionistic way. We noticed that the heart rate will never lie when one is really enthusiastic in something, so this can reflect one’s feelings faithfully. Also, the project can be generalized into various subjects and major. What’s more, it can be even used to tell whether one is falling in love with another person by simply changing the picture hung on the board behind the box.

LITERATURE AND ART, PERSPECTIVES AND CONTEXTS

According to the reading assigned to me so far, two of them have influenced the process of shaping the project. One is The Art of Interactive Design, Crawford (pages 1-5). The author stated the definition of the interaction in the paragraph, which is input, process and output (or listen, think and speak). We were trying to apply the idea into our own project, so that we built the interaction between the man and the machine, as well as between two people. When the heart rate is sensed by the sensor, there will be a series of data processing by the Arduino. After that, the output will be different signals. Also, to be more interactive, we add the competition part, which is the most difficult part of the coding. We compare the heart rate of two users in order to draw the final conclusion. It’s a kind of competitive game, and it enforce the connection and interaction between the two users. Another article which influenced the project was Making Interactive Art: Set the Stage, Then Shut Up and Listen by Tom Igoe. We got some useful information during the user-test session. During the whole designing part, we didn’t ask for any information from others or the users. We were concerned about being interrupted from shaping a suitable idea. However, we made fully use of the user-test part, where we got some fantastic suggestions like being more entertainment and having a more interesting theme so that it can be used in the daily life. There are two artists that inspired me along the way we designed the project. They are Filip Visnjic who designed the Face Trade – Art vending machine that trades mugshots for “free” portraits. We got the idea of including the information of the picture into the interaction. As the artwork he designed transform the information of the users into that of the image, we can also build a connection between human feelings and images. This can be an interesting way of interaction. Another project by Visnjic called Spirotrope – Stirling Engine powered Spirograph animation has inspired me too. The idea of this artwork can be simple, which is to make the drawing rotate to present a beautiful and lively image. We can see that the idea can be simple, but as long as it is presented in an interesting and innovative way, it can still become charming. So we simply focused on a daily-life problem, and try to solve in a different way combining our knowledge in Arduino. Another artist is Kevin Holmes who imitate the iPhone touchscreen interaction by some simple machines. We can see that the project should derive from the life and it can be a good one as long as the theme is illustrated clearly. There are some artworks that I don’t like, and I think I’ll try to avoid such things. One is the Fiberbots – Framework for cooperative (swarm) robotic manufacturing. I don’t like it because it makes no sense that there is no actual meaning when the robots move. So we do have a theme and we try to make our project solve a certain problem. Another project that alerted us is the Encounter – Suspiciously curious robotics. Even the idea of the project is great, and it is well designed, but the machine itself seems to be cold and hard without human interest. For the projects that emphasizes the interaction between human and machines, it is really important to make it firm and passionate. So we go with some materials which seems to be gentle such as the cardboard which seems like wood, as well as the warm-toned of the whole project.

PROJECT DESCRIPTION

For the interaction, what we have at our first thought is the sensors. As we don’t have enough knowledge about programming, we shall use sensors to interact. One other inspiration which had influenced our original thought was one machine mentioned in a Chinese talk show. Similar to our first draft, the machine is used to test the affection between couple and lovers. When the user put their hands on the machine, the machine can show if they are in love. Although we had no idea of the physical technology behind this project, but we realized that we can do something with the same aim. We tried to make interaction between lovers that when they look into each other’s eyes, the heart rate will go higher. However, the output of the interaction between two people cannot be easily presented, and there isn’t a specific heart rate when someone fall in love with another person. And then we focused on the competitive games which can compare the heart rate of two users. We thought of controlling a car by heart rate, but we faced some difficulty while coding. We were trying to match the function of heart rate sensor with our daily life. Our inspiration comes from the recently faced issue which is to choose the class for the next semester, and the project is a kind of solution. The rising of the heart rate means excitement, and excitement means true interest. We’ve thought about how to measure the interest, and we realize the only sensor about our mentality instead of the physical factors is the heart rate sensor. Another way is to identify the emotion through the facial expression by taking photos of the users. However, identifying and analyzing the facial expression can be really hard for us, so only the heart rate sensor is available.

PROJECT SIGNIFICANCE

The major fitting clips can be used for every major or subject and for each individual who is concerning about the major. Compared to other means to test if the major or the subject is suitable, this project can help the users do the decision rationally, which truly follows the heart. Also, we want to make the project both useful and entertaining, so the competing part was added to the project. (One problem here can be that the comparison may limit the utility of the project, which can only be used to decide who is better fitted among the two users, but it’s hard to be used for one single user). We believe that after some improvement, a new version will pop out, which will definitely be suitable in universities and some high schools.

PROJECT DESIGN & PRODUCTION

Through the whole process of making the project, our idea changes for various reasons. After deciding to use heart rate sensor, we faced tons of problems. The first one was the original code. We found the code on the official website of the company of the sensor, but it wasn’t working. We tried to ask for help from Nick and Cici, but still nothing happened. Finally, it turned out that one heart rate sensor wasn’t working, and it worked will as we changed another one. One other problem that we faced was the coding stuff. It was hard to combine two Arduinos onto one breadboard, for the designer of the code online used a function which he designed himself, so we couldn’t understand it or change it. We asked one of our friends for help, he changed the whole part of the function. However, it could be hard to compare the two heart rates. Leon offered an idea that we didn’t need to reach the exact number of the heart rate, instead, we could simply count the numbers. We tried this and it was really a excellent idea. However, it wasn’t working during the user test, and we finally fixed it afterwards.

CONCLUSIONS

Our goal was designing a new project about major choosing. The project can be regarded as a kind of success. However, there are still bugs within our project. We should compare the variation of heart rate instead of the heart rate itself. Also, the comparison could be meaningless, and it cannot be used of one single person. Generally, through the whole process of making our project, the most important thing we learned is about coding, and when one certain way stuck, we may try to change another solution. We realized the importance of the user test, where we can get some feedbacks. Debugging can be really hard, and only with critical thinking can we solve the problem.

int heartRate1;
int heartRate2;

void setup() {
  // put your setup code here, to run once:
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
Serial.begin(9600);
}

void loop() {
  //Serial.print("PLAYER_1:t");
  //Serial.println(digitalRead(2));
  //Serial.print("PLAYER_2:t");
  //Serial.println(digitalRead(3));
  delay(10);
  // put ;your main code here, to run repeatedly:
if (digitalRead(2) == 1){
  heartRate1 = heartRate1 +1;
}
if (digitalRead(3) == 1){
  heartRate2 = heartRate2 +1;
}

int heartRate1_serial = heartRate1 / 100;
int heartRate2_serial = heartRate2 / 100;

//double floor(double heartRate1_serial);
//double floor(double heartRate2_serial);
Serial.print("PLAYER_1_is:t");
Serial.println(heartRate1_serial);
Serial.print("PLAYER_2_is:t");
Serial.println(heartRate2_serial);

if (heartRate1_serial > heartRate2_serial){
  digitalWrite(6,HIGH);
  digitalWrite(7,LOW);
  #include "pitches.h"

// notes in the melody:
int melody[] = {
  NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4
};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
  4, 8, 8, 4, 4, 4, 4, 4
};

  // iterate over the notes of the melody:
  for (int thisNote = 0; thisNote < 8; thisNote++) {

    // to calculate the note duration, take one second divided by the note type.
    //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
    int noteDuration = 1000 / noteDurations[thisNote];
    tone(8, melody[thisNote], noteDuration);

    // to distinguish the notes, set a minimum time between them.
    // the note's duration + 30% seems to work well:
    int pauseBetweenNotes = noteDuration * 1.30;
    delay(pauseBetweenNotes);
    // stop the tone playing:
    noTone(8);
  }
}

if (heartRate2_serial > heartRate1_serial){
  digitalWrite(6,LOW);
  digitalWrite(7,HIGH);
  #include "pitches.h"

// notes in the melody:
int melody[] = {
  NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4
};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
  4, 8, 8, 4, 4, 4, 4, 4
};

  // iterate over the notes of the melody:
  for (int thisNote = 0; thisNote < 8; thisNote++) {

    // to calculate the note duration, take one second divided by the note type.
    //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
    int noteDuration = 1000 / noteDurations[thisNote];
    tone(8, melody[thisNote], noteDuration);

    // to distinguish the notes, set a minimum time between them.
    // the note's duration + 30% seems to work well:
    int pauseBetweenNotes = noteDuration * 1.30;
    delay(pauseBetweenNotes);
    // stop the tone playing:
    noTone(8);
  }
}
}

Midterm Project: Major Fitting Clips, Yumo Yao (Leon)

Midterm project: major fitting clips

Materials:

·     Arduino or Genuino board: an electrical coupler to do the output of the code.

·     hook-up wires: for connecting the circuit.

·     Breadboard: for placing all the materials.

·     LED: to give out light signals.

·     Heart rate sensors: to measure the heart rate of the user.

·     Motors

·     Batteries

 

Description:

The project aims at helping users to determine majors. The project takes IMA major as an example. The user should look at the picture of Leon and Nick stuck to the box, and the heart rate will be measured. Comparatively, the one who has higher heart rate will have his/her LED on, as will as the flag rotating, which means he/ she is more suitable for the major.

 

Inspirations and ideas:

For the interaction, what we have at our first thought is the sensors. As we don’t have enough knowledge about programming, we shall use sensors to interact. Our original thought was a machine which can test whether two people are falling in love. We tried to make interaction between lovers that when they look into each other’s eyes, the heart rate will go higher. However, the output of the interaction between two people cannot be easily presented, and there isn’t a specific heart rate when someone fall in love with another person. And then we focused on the competitive games which can compare the heart rate of two users. We thought of controlling a car by heart rate, but we faced some difficulty while coding. We were trying to match the function of heart rate sensor with our daily life. Our inspiration comes from the recently faced issue which is to choose the class for the next semester, and the project is a kind of solution. The rising of the heart rate means excitement, and excitement means true interest. We’ve thought about how to measure the interest, and we realize the only sensor about our mentality instead of the physical factors is the heart rate sensor. Another way is to identify the emotion through the facial expression by taking photos of the users. However, identifying and analyzing the facial expression can be really hard for us, so only the heart rate sensor is available.

 

Designing and coding progress:

For the physical design, we first considered using 3D printer. However, we found that it might take so much time and the project is too small to place all the materials. Laser cut is a wonderful tool to make a box. There is a certain website to make a box by different materials, and the only difference between cutting something off and simple carving some characters onto the material is whether it is 0.1 pt. Also, we learnt how to align different images in AI.

For the coding stuff, it was the biggest difficulty that we had never met before. Basically, we had two heart rate sensors, and we have to connect them onto one single Arduino so that the comparison can be able to be carried through. We downloaded the code from the official website of the sensor, only find that we couldn’t understand some parts of it. It has defined a new function to count the speed of heart rate, and redefine some of the pins, for example, analog 2 was defined as pin 0 by the function. As the two sensors have to connect to different pins, we have to rewrite the function which is almost impossible for us. Then we got stuck because the first few step wasn’t working. We turned to Leon for help, and he provided an easier solution that we don’t need to know the exact heart rate, but we can count numbers when the heart beats, so the one with a larger number in a certain period has a higher heart rate. Thus, the problem is simplified, and we could finally come to the solution.

There are always mistakes and bugs and we are always debugging our code. Luckily, we’ve finally figured out how to deal with them.

int heartRate1;
int heartRate2;

void setup() {
  // put your setup code here, to run once:
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
Serial.begin(9600);
}

void loop() {
  //Serial.print("PLAYER_1:t");
  //Serial.println(digitalRead(2));
  //Serial.print("PLAYER_2:t");
  //Serial.println(digitalRead(3));
  delay(10);
  // put ;your main code here, to run repeatedly:
if (digitalRead(2) == 1){
  heartRate1 = heartRate1 +1;
}
if (digitalRead(3) == 1){
  heartRate2 = heartRate2 +1;
}

int heartRate1_serial = heartRate1 / 100;
int heartRate2_serial = heartRate2 / 100;

//double floor(double heartRate1_serial);
//double floor(double heartRate2_serial);
Serial.print("PLAYER_1_is:t");
Serial.println(heartRate1_serial);
Serial.print("PLAYER_2_is:t");
Serial.println(heartRate2_serial);

if (heartRate1_serial > heartRate2_serial){
  digitalWrite(6,HIGH);
  digitalWrite(7,LOW);
  #include "pitches.h"

// notes in the melody:
int melody[] = {
  NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4
};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
  4, 8, 8, 4, 4, 4, 4, 4
};

  // iterate over the notes of the melody:
  for (int thisNote = 0; thisNote < 8; thisNote++) {

    // to calculate the note duration, take one second divided by the note type.
    //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
    int noteDuration = 1000 / noteDurations[thisNote];
    tone(8, melody[thisNote], noteDuration);

    // to distinguish the notes, set a minimum time between them.
    // the note's duration + 30% seems to work well:
    int pauseBetweenNotes = noteDuration * 1.30;
    delay(pauseBetweenNotes);
    // stop the tone playing:
    noTone(8);
  }
}

if (heartRate2_serial > heartRate1_serial){
  digitalWrite(6,LOW);
  digitalWrite(7,HIGH);
  #include "pitches.h"

// notes in the melody:
int melody[] = {
  NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4
};

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
  4, 8, 8, 4, 4, 4, 4, 4
};

  // iterate over the notes of the melody:
  for (int thisNote = 0; thisNote < 8; thisNote++) {

    // to calculate the note duration, take one second divided by the note type.
    //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
    int noteDuration = 1000 / noteDurations[thisNote];
    tone(8, melody[thisNote], noteDuration);

    // to distinguish the notes, set a minimum time between them.
    // the note's duration + 30% seems to work well:
    int pauseBetweenNotes = noteDuration * 1.30;
    delay(pauseBetweenNotes);
    // stop the tone playing:
    noTone(8);
  }
}
}

Week5: drawing machines, Yumo Yao( Leon)

Circuit: Drawing Machines

Materials:

·     Arduino or Genuino board: an electrical coupler to do the output of the code.

·     hook-up wires: for connecting the circuit.

·     Breadboard: for placing all the materials.

·     42STH33-0404AC stepper motor: to rotate with the control of the Arduino.

·     SN754410NE ic chip: a plastic packaging piece where all the integrated circuits are contained.

·     power jack: to connect to the power.

·     12 VDC power supply: to provide power for the circuit.

·     2 * Laser-cut short arms

·     2 * Laser-cut long arms

·     1* Laser-cut motor holder

·     2 * 3D printed motor coupling

·     5 * Paper Fasteners

·     1 * Pen that fits the laser-cut mechanisms

·     Paper

 

It is easy to connect the circuit with the instruction of the picture posted onto the website. The only thing that need to be noticed is the connection of potentiometer. There are 3 pins within the potentiometer, and 2 pins on the side should connect to the power and ground respectively, while the other one connected to the analog. When we find that the ground pins or the power pins are not enough, don’t forget to connect them with the breadboard, so that we can get a row of pins. There is a certain delay when we use the potentiometer, that the direction of the rotation cannot change immediately when we rotate the potentiometer. Also, the stepper motor may stop if there is no operation within a certain period of time, so we have to operate it at set intervals. The other steps are always physical connections, and the machine can work in that case.

Question 1

What kind of machines would you be interested in building? Add a reflection about the use of actuators, the digital manipulation of art, and the creative process to your blog post.

I would like to build a machine that is connected wirelessly to my brain so that it can read my thought. It’s like a much more intelligent version of Siri, and as I give order to it, it can provide various services accordingly. It has a sensor that can sense the subtle brain activity of the user, and then transfer the biological signals into electrical signals. The electrical signals will be processed accordingly, and the screen made of LEDs will show the instruction which was read from the brain.

When the user put on the wearable equipment on his or her head, the machine will start working automatically. The signal form the brain might be subtle movement of some certain parts of the brain or the electrical signals in the nerves. Different combinations of the signals might mean different thoughts in the mind. As the machine itself has entered the information that what each combination means in advance, it can show the order on the LED board.

To create such a machine like that, the first part is to try to know what is happening inside the head with only the equipment outside the brain. Through a series of sensors such as the temperature sensor and the electricity current sensor, we can get the information from inside the head. Also, with the help of the 3D printer, the wearable equipment can be easily designed. It might look like an earphone. The whole digital transforming part can be designed in Arduino, python, and some other coding systems. 

 

Question 2:

Choose an art installation mentioned in the reading ART + Science NOW, Stephen Wilson (Kinetics chapter). Post your thoughts about it and make a comparison with the work you did during this recitation. How do you think that the artist selected those specific actuators for his project?

One of the project that I found interesting is the drumming and drawing subhuman, which is a computer-controlled robot. This robot imitates the movement of human drummers in a certain way and play music. I think it is really interesting that human beings were trying to manifest human behaviors onto different robots, and this opinion still works in recent days. Both this robot and the drawing machine imitate a certain function of human mind such as playing the music and drawing. However, the robot seems to be much more intelligent.

Week 4, Research Project (Leon)

my definition of interaction:

Interaction happens at all time. It can happen between human beings, as well as between human beings and physical machines. Generally, interaction is a process of listening, thinking and speaking, which means input, process and output. When you give an instruction, the machine will process in a certain way that we set in advance, and then it will send out the information through some physical way such as sound, light, moving etc. Also, the interaction between human beings happens everywhere in our daily. Where there is communication, there is interaction. When we talk to each other, we give instructions, then the listener will think, and then answer and react. Actually, in my opinion, there isn’t anything that is not interaction. For example, even the simplest thing like typing on the computer, I give my computer instruction by typing on the keyboard, and the computer interact with me by showing words on the screen. After reading what is shown on the screen, I will think and have some further reaction. So, we can say that interaction is a transition of information or energy.

 

comments on two projects:

The one project that I really like is ChineseWhispers – Inaccurately transmitted gossip. This project, based on Arduino, includes 4 rotating heads made of plastic arranged in a row. There is a speaker is the mouth of each head, and the design emphasizes the speaking and listening part of the head. When the operator says something to the first head, it will turn to the next head and repeat what the operator says. Then the second would turn to the third one, the third to the fourth. The most interesting part is that the conversation between the first and the second head sounds like the words of the human beings, but when the words spread further, the tune sounds higher and sharper. Especially the conversation between the third and the fourth one is too sharp to recognize the content, and the sound is harsh and strident. I like this one so much because the idea of the design really touches me. So terrifying it is that the rumor would change into a worse one after several times of transmitting. This idea seems to be widely known, but it is hard to present this simple idea in an interactive way. This includes interaction between human and machine as well as the interaction between different parts of a machine. The interaction makes the point clear and interesting.

 

The one project that I dislike is Face Trade – Art vending machine that trades mugshots for “free” portraits. This machine would scan the face of user and make an abstract portrait painting according to the picture it scanned. I do not like it because I couldn’t figure out the connection between the human face and the painting, and there is no similarity between them. Also, it mentioned that the machine would do it for free as long as you agree to keep your facial image in the machine permanently. I think this is kind of violating the privacy of the user. Generally, this interaction seems to make no sense.

 

group work:

At first, we misunderstood the requirement of the research project. We thought of some mechanical way of doing the project like using some materials like wheel gears and pullies. At that time, we had no idea of what to do, and it could be really hard to learn about mechanical design ourselves and figure out the solution in that limited time. We were inspired from the video shown in the class, which was about an intelligent toaster, and then we thought about limiting all the ideas within a box. Then we focused on the probably problems that may happen in 2118. Finally, we focused on the environmental problem, for we still want to keep some simple mechanical elements in our project.

Basically, our project was about protecting the extinct plants that we put the plants in the boxed nature in advance, the environment inside the box can provide it a suitable temperature and moisture so that it won’t be in danger. When the user need the plant for displaying or scientific research, they can pull up the slider bar and rotate the rotary switch on the side of the box so that the lid of the box can open, and the plant will rise. Since the opening and rising device can’t be handled by a single person but two or even more people, this project was designed to promote the interaction between human beings.

 

my critique:

I would like to criticize that there exist some interactions that in meaningless and even bring some inconvenience to our daily life. Let me take the tune which rings whenever someone get into familymart as an example. This interaction doesn’t sound like a warm welcome, and it might disturb other consumers in the convenience store. Generally, there is no practical significance of this design, and if interaction is made simply for interaction itself instead of reinforcing the connection between human beings or between human beings and machine, it could be regarded as a waste of resource.