Interaction Lab – Final Project:PROJECT PROPOSAL(Xinran Fan)

About the final project, my partner Lifan Yu and I come up with three project proposals. They  are all inspired by the what happen in our daily life.

  1. be safe online

This idea come out when I was reading the news, there is a report said the elders are easier to be cheated because most of the elders actually are very “young” netizen in todays’ complex online environment. Be inspired by the children game for develop intelligence , why the elders could not have a game to let them know more about the negative side of the internet and practice to avoid the trap of the conmen.

First of all we are going to project the game from the computer to a larger screen. At the first, there is only a phone on the screen, you need to press the button to start the game.

Then the green and yellow light around the screen begin to sparkle one by one and use the speaker to play some gay music. Many small pieces of the scam text messages and fake advertisements flied out.

The next is the main content of the game, the player can choose true, confuse and fake to show his attitude.

If the player can respond the right answer for a certain number questions , all the green light will turn on and play a hilarious music, you can even  get a candy as reward from the small machine beside you by infrared distance sensor; but if you fail all the red light will turn  and play a sad music.

2.Save Me From Plastics!! 

These days my partner focus a lot on the environment protection, especially the plastic pollution of the marine environment. We discuss about it and decide to make some effort to call fpr more people work on it. So through this small game we hope can inspire more people focus on the environment protection.

This game need two players to cooperate with each other, one plays as a human while the other’s role is a fish. The human need to pick up the plastic trashes before them fell into the sea, if he fail one, it will drop into the sea.And the ‘fish’ need to get ride off the plastic trash, if he fail to run away from the  plastic, the  fish will eat the trash. And after eating a certain number of the trash the fish will dead and the game end. The motion of the fish is control by two button while that of the human  controls  by mouse. This totally show that only the human stand with the nature that  can we save  our both home-earth! This game is for everyone, to advocate us to take action immediately .

Scott Snibbe’s – Interactive art: ARCTIC ICE (2008) https://www.snibbe.com/education-entertainment#/arctic-ice/ 

This little game really inspired me about what kind of game should we build  to show the importance of the environment protection.

3. Scare halloHalloween 

The last one is quite different with the former two, it is not and computer game but a sand table game. We use 3D-printer to build a sand table with rockery, tunnel. The player as a paper figure move according to a track, whose speed can be controlled by the  computer. During his tour, he will ghosts waiting to suddenly appear on the way, a cross hang on the top of the tunnel which may fall down at anytime, a group of crow will suddenly ‘fly out’ by a hidden fan. Those are all control by the arduino while we also use processing to make the background animation which tightly  connect to the movements of all the elements. What’s more we used a black curtain cover it on a metal frame which pretend to be a haunted house and use servos to control pulling it up and down.

This project is inspired by the animation made by my partner while is first taken out by me. It like make  real models of all the elements in the video below and use the ardiuno to control its motion, and use the processing to make a background

Resitation 7 Function and Arrays-Xinran Fan

Recitation:

In today’s recitation, we are expected to practice the function and arrays, especially the loop and arrays, they are two great function to shorter the code. I used them to build an animation with many elements.

step 1

In the first step, I use the arc(); to build an eater.

step2

using for loop(); to build 100 elements.

put the loop under the void draw();

step3&step4

int eaters = 100;
float[] x = new float [eaters];
float[] y = new float [eaters];
color[] c = new color [eaters];
float [] speedX = new float [eaters];
float [] speedY = new float [eaters];
float[]size=new float[eaters];
void setup() {
  size(600, 600);
  background(255);
  ellipseMode(RADIUS);
   for (int i=0; i<x.length; i++){
x[i]=random(width);
    y[i]= random(height);
    speedX[i]= random(-5, 5);
    speedY[i]= random(-5, 5);
   size[i]= random(10,200);
    c[i]= color(random(255),random(255),random(255));}}
void draw(){
  background(255);
  for (int i=0; i<x.length; i++) {
eater(x[i], y[i], size[i], c[i]);
    x[i]= x[i] + speedX[i];
    y[i]= y[i] + speedY[i];
    if (x[i] > width || x[i]< 0) {
      speedX[i] = -speedX[i];}
    if (y[i] > height || y[i]< 0) {
      speedY[i] = -speedY[i];}} }
  void eater(float x, float y, float size, color c) {
  noStroke();
  fill(c);  
  arc(x*10+15, y*10+10, size, size, 0.52, 5.76);
  fill(255);
  ellipse(x*10-size*0.3, y*10-size*0.4, size*0.1, size*0.1);
  rectMode(CENTER);
  fill(c);
  rect(x*10+15+size*1.2, y*10+10, size*0.5, size*0.5);}
optional:
use the keypressed to control it.
 if (keyPressed==false){

 }
     else{
 
Question1:
If the for loop under the 'setup', it can only run once.So the image stay still.
But if you put it under the draw();, the loop will run over and over again, so the image will be given different position, and at last the image will display everywhere.
Question2:
In my animation, there are 100 elements, if I don't use the arrays, I have to control every elements individually, and this will lead to a very complex 
code. Thanks to the arrays I can make it clear and understanding.

The first step of the Final Project by Interaction Lab(Xinran Fan)

PREPARATORY RESEARCH AND ANALYSIS

A. You visited the Chronus exhibition where you saw technology-based art pieces. Some of them use the same components you have been using in this course. Discuss the experience you had in this exhibition compared to other exhibitions of non-technology based art work you have visited before.

To begin with, let us focus on this question”Just What is it That makes Today’s Computers So intriguing, So Nonsensical?” I took this question during the whole visit in the Chronus exhibition, and at last I feel something, something really critical and artistic, is alienation.

Alienation, in my opinion, is why the computer is always so attractive to people. From one aspect, Computer is totally different from human-being but also the most similar to human-being. We make it but we can’t understand it, and we have to rely  our future on it! So there is no denied that the computer become the sign of inorganic and unknown. What’s more, computer as an artificial tool, it hold an identity of the future from the original. Combining it with the ideologic of the artist, which deliver to the most intriguing nonsensical beauty in the world- senseless, eternal, an alienation of our emotion world in to a cold unoriginal world, as an apocalypse.

In a conclusion, the computer’s art is not on the computer itself but on the human, on their relationship. All in all, we visit the exhibition for enjoy the charm, for inspiration,  but those were all subject concept, computer is only an agency carried the ideologic from the author’s mind to the observer. From this aspect, the Chronus exhibition is just like those non-technology based art work. Especially those post-modernity art work, which carry an apocalypse feeling That is the theory of art gaining the ideologic hid in the art works. Because the ideologic contain in the work is given by the artists, however, the charm of the art is that what the observer eventually receive has a floating block which influenced by the observer itself. In other words, it is the variety that make the art alive.

But the most difference between non-technology based art work and the exhibition we seen is also about the ‘alive’. Not like the picture, music or film, the  relationship between the observers and art work is one-way. The behavior of the observer could not influence  the art work itself. But the communication here is bidirectional. The Artificial Intuition by zhang hua is the most typical example for this. It used the infrared ray to perceive the location and the motion of the observers. The machine can move to block the observers’ way and  even scratch them. This project used the distance sensor, and the motor in our section.

The observers experience the machine, the machine react to the observers, is not only the mind of the observers influence the what they gain, but they receive totally different thing just from the beginning. And this bidirectional communication is interactive.

But what give me the most profound impression is not those very typical, it is a very special device among all the exhibition I experience- The Form of Becoming by Fito. The sculpture is comprised of a system of intelligent agents in a simple environment with a defined number of possible states to be in and a choice of actions to be exerted.

The uniqueness of this machine is that it has some kinds of artificial intelligence. It can explore the some certain area freely. That’s the most fantasy, machine in this work is not only the tool, the servant of the human-being, instead it become the main characters, to some extent, we can say that it ignore us, the observers. We watched it explore the environment around it and learn from the information it gain in silence, just like a newly born animal. A whisper slides in my mind “that is the becoming”. Motor is unavoidable in this device.

B. Research at least two other interactive projects to serve as inspiration for your Final Project. Find projects that align with what you think a successful interactive experience is and at least one that you think is less successful.

Then I want to introduce you about 10.000 Moving Cities – Same but Different, real cubes.

In this project, They build a model just like a city of screen.Four projectors and eight audio speakers project the results into the space. Visitors are able to walk through the model and experience the information in 3D.Attracted and inspired by images, sound, text and videos, visitors explore the places and perceive fragments of the immense amount of data. Additionally audio and visuals constantly change, they are never the same, always in movement as the place as itself. Just as all cities over the world are different, so different and alive appear the projections and sounds. Each new request always creates new representations of the real world as a combination of visitors and digital matrix.

First, this system is very easy to operate.Visitors can select any city or place, using a digital interface.This reminds me that no matter what project  you are going to  build, it is very important to make it easy to handle, or that’s no way for the visitors to have a pleasing experience. What’s more, I think this project has the most completed reaction system I have ever seen. About the chosen place, the Internet is searched in real time for latest text, image, video and sound informations.Though we can’t collect so much digital, I really inspired to create such an immersive experience.

In addition, I’d like to talk about theRule 30: Cellular Computation In Blue And Yellow .

The artwork “Cellular Computation In Blue And Yellow” uses the cellular automata mechanism discovered by Stephen Wolfram in the 1980s found across physics, chemistry and biology to explore how simple rules occurring in nature can create complexity and unique aesthetics.From snowflakes to patterns on the shell of sea snails. Nature is using cellular rules we can observe and calculate in mathematical models and visualise through iteration.

Unlike the former one, this one it seems too simple. However, this breaks the bias stay in my mind for a long time. Is a good interactive project must glitzy and completed? Of curse not, this device only include picture, but it still link the biological and chemical elements with computer science by the real world system in a high level. It shows me a way how to deepen the inner meaning.

About the one I dislike, I must point out the rain – represent potential of rain.

This device use high tech to build a rain, which is splendid and philosophical, but I have to say it is more close to an art work than an interactive media project. This show me that we can build a really beautiful project but we can’t pay too much attention on the art designer that overlook the interactive system. It is very important to remember that using a lot of tech isn’t mean that it is an interactive project. We should not forget that three essential steps to definite the interaction.

C. Go back to your definition of interaction as you defined it during the group project. Based on the initial definition and your experience developing and executing your midterm project, in your own words, explain what an interactive experience should consist of to be successful. Support your explanation by your analysis of the projects you researched in point A and B, and by citing references from the readings, and other artists or online articles you have read. 

Interaction, in a simple words is just the communication.In the introduction to Physical Computing written by Igoe and O’sullivan, the interaction is “an interactive process that including listening, thinking and speaking  two or more actors”. In a more technological words, it is INPUT, PROCESSING, OUTPUT. So the most important part of a success interactive project is three completed  step and an obvious bidirectional communication.

In my midterm project, I build a plant watering reminder with my partner. We used the humidity of the soil as the input, the electronic current in the circuit as the processing, and the sparking light, audios and the motion of the servos are the output. Though it is not the human control it directly as the research I list before, but the interaction do not mean human must be one of this actor. 

In A part, Artificial Intuition takes the location and the track of the visitors as the INPUT, the PROCESSING happened in the computer beside it, and the motions of those mechanical paw are the OUTPUT. In B part, the movements of the visitors are the INPUT, PROCESSING by computer, and a splendid OUTPUT. But in the rain – represent potential of rain where you can’t tell there is a concert INPUT.

Then I have to emphasize a deep connotation and a relatively completed reaction system. Just like those examples I list in A part, which lead us to  think about the what is the becoming, what will our future become? In B part,

the images, sound, text and videos of the 10.000 Moving Cities – Same but Different, real cubes.really give us a good example about what is a relatively completed reaction system. and the meaning of the theRule 30: Cellular Computation In Blue And Yellow .also show a new and deep idea to all the visitors .

Citation

http://marclee.io/en/10-000-moving-cities-same-but-different/

Introduction to Physical Computing https://drive.google.com/file/d/1uviCK0V71cQpA76PV9PK03Df14vcsd0y/view

https://www.creativeapplications.net/member-submissions/rule-30-cellular-computation-in-blue-and-yellow/

Recitation 6:Processing Animation by Azena(Xinran Fan)

Recitation

preparation

For this recitation, I made a short animation mostly based on what I paint last week, which I most use the rect(); fill();  and noStroke(); function. Inspired by an image drawn by Josef albers from Bauhaus School of Arts. It is not including many high level function, but the scale of it really bother me.

The characteristic of this image remind me of a China politic figures, so I decided to make an animation to male fun of him. I must put out at the beginning that even him is a very controversial person, but his personal charm that really attract me, this joke means no offend of him.

image

First I’d like to change the rectangle in image into a figure. So first I used  the line(); Stroke(); and strokeWeight(); to build a black frame glasses, which really a classic sigh for him. Than I used ellipse(); to make a hat for him.In addition, I first come up with using vertex(); to make  a red five-pointed star, but soon I find that it is really hard to determine its coordinations, so under the advise of my partner, I find out how to put the image into the processing.I use this not only put a red five-pointed star, a frog(he really look like a frog) and the favorite poem of him.

img1 = loadImage(“-1~s.png”);

PImage img1;

image(img5,200,0,img5.width/8, img5.height/8);

Animation

Then I decide to make it movable.This is the final code and video.I will introduce you about some main steps below. 

The first step, I want to make the grey eyes sparking, so I use the random function.

if (key==’a’&&keyPressed) {
int r = int(random(0, 255));
int g = int(random(0, 255));
int b = int(random(0, 255));
fill(r,g,b);}
else {
fill(108,106,106);}
rect(138,241,52,102);

The second step, I’d like the main rectangle (the face of it) to magnify and shrink, so:

fill(75,200,67);
rect(294.5,326,x,y);
if(key==’a’&&keyPressed) {
x++;y++;}
else if(key==’l’&&keyPressed) {
x–;y–;}
else{
x=515;y=377;}

when I find it can only magnify and shrink in the corner, I ask an assistant for help, then she show me the  rectMode(CENTER);

the third step, I use mouse to control the ‘-1s’, make it only appear then it get close to the a black frame glasses, but the question is how to make it disappear. I worked around and at last come out with a solution-use transparency image to cover it.

float d1 = dist(mouseX, mouseY, 164, 292),d2 = dist(mouseX, mouseY, 438, 292);
if(d1 < 104|d2<104) {
image(img1, mouseX, mouseY, img1.width/7, img1.height/10);
}else {
image(img4,mouseX,mouseY,img4.width/6, img4.height/6);

Then at last, I want the frog to jump around, thanks to the reference book, Use the noise();

float w = noise(frameCount/10.0)*100;
image(img3,z,w+300,img3.width/6, img3.height/6);
if(z<width-10){
z+=10;
}else{
z=10;
if (i<20000){
i=i+10;}
z=z+i;}

Additional work

There are two main problems do I meet, first I added HBS in the colorMode(); as the guide but I find it hard to make sure what color is the white in this system, I tried many times to certain the white is 100.

The next problem is how to use the if function to make it shrink automatically, about that I got inspiration from the class yesterday, ‘||‘ is really an amazing logic symbol.

commend

Of course I learn many function on the lessen, which lead me to create some simple animation. I can control the shape, color , movement and use the key or the mouse to command it. This is a very low level’s interaction.

  

Midterm reflection-Xinran Fan

Take with plant-Azena-Inmi

INDIVIDUAL REFLECTION: 

Even begin to write this blog really need a lot of courage, this project is so complex that take us three nights to finish it all. And I even one day sleep in the safe at eight floor for that. From design to make the circuit to code, every step we meet so much obstacle, so it is really encourage that we final success to build this over project device!

  • CONTEXT AND SIGNIFICANCE
  1. My previous performance is about using the tech to directly express human’s emotion by painting color or sparkling light. So this time I also use sparkling light but with many different methods to show the  situation of the plant.
  2. The Wave in  the last doc remind me that not all the interactive device need human as the initiative role. And in my project the plant, which can not talk and move with the help of the this machine and become the initiative one while the human need to give the reaction. What’s more, the Recreational Machine with sparkling light, yelling cartoon  characters and  sound give me idea to mix the image, light, sound and movements together.
  3. The most special part of my device is list on the last question.
  4. Actually, at first we want to build a smart pot which can help you water( and water in a correct amount) which I know it is already exist, but under the suggestion of the professor we find out that it is quite impossible to build that as a interactive freshmen, so we give it up. 
  5. of course this “wave flower reminder” is for those people who always forget to water the flowers. And also I think it will attract those people who want to make the process of watering the plant more active and interactive with their speechless friends.                                                                                                                                  
  • CONCEPTION AND DESIGN:
  1. At first I was quite worry about if my device is not interactive enough, but when I saw the classmates water the plant and surprise about the change, I felt that even our project is not connect to a social problem, it is interactive. It can’t change quickly because it is plant who take the initial part, slow it is our speechless friends lifestyle, you can’t regard the slow as not interactive enough.
  2. material: one normal blank board and two small one; three LED light in different color; countless color papers, cardboard; a pair of speaker; a SD card reader; a mp3 sensor; a Moisture Sensor; an Infrared Distance Sensor; an Arduino; countless wires; two servos.
  3. I choose them because I want to build a system including the vision , audio, and motion, and they will change according to the static from Moisture Sensor. And the Infrared Distance Sensor under the suggestion from the user test that we do not want it to disturb us all day, just remind us when we came  close to them.
  4. About how to make the audio system, the professor and the fellow give us a lot of scheme, using many different material but at last we build this kind of device.

FABRICATION AND PRODUCTION:

  1. The significant part and of course the hardest part in our project is coding. I even have no idea how to start the first coding. The first code (about light) with the help of a kind boy’s help.
    int sensorPin = A0;
    int sensorValue = 0;
     
    void setup() {
        Serial.begin(9600);
    }
    void loop() {
        // read the value from the sensor:
        sensorValue = analogRead(sensorPin);
        Serial.print(“Moisture = ” );
        Serial.println(sensorValue);
        delay(1000);
    }
     
    void setup() {
      pinMode(9, OUTPUT);
    }
    void loop() {
      sensorValue = analogRead(0);
      if(sensorValue>200){
       analogWrite(2, 200);
      
      } else if (sensorValue<200 && sensorValue>40) {
       analogWrite(4, 200);
      } else {
        analogWrite(6,200);
      }

    Then I struggle myself to write the servos’ code into it.

    nt sensorPin = A0;
    int sensorValue = 0;
    #include <Servo.h>
     
    Servo myservo1; 
    Servo myservo2;
     
    int pos = 0;   
     
    void setup() {
      myservo1.attach(9);
      myservo2.attach(11);
        Serial.begin(9600);
         pinMode(2,OUTPUT);
         pinMode(4,OUTPUT);
         pinMode(6,OUTPUT);
    }
    void loop() {
        
        sensorValue = analogRead(sensorPin);
        Serial.print(“Moisture = ” );
        Serial.println(sensorValue);
     
          sensorValue = analogRead(0);
      if(sensorValue>200){
       analogWrite(2, 200);
         for (pos = 0; pos <= 180; pos += 1) { 
        myservo1.write(pos);              
        delay(15);                       
      }
      for (pos = 180; pos >= 0; pos -= 1) { 
        myservo1.write(pos);              
        delay(15);                       
      }
      
      } else if (sensorValue<200 && sensorValue>100) {
       analogWrite(4, 200);
      } else {
        analogWrite(6,200);
        for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
        // in steps of 1 degree
        myservo2.write(pos);              // tell servo to go to position in variable ‘pos’
        delay(15);                       // waits 15ms for the servo to reach the position
      }
      for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
        myservo2.write(pos);              // tell servo to go to position in variable ‘pos’
        delay(15);                       // waits 15ms for the servo to reach the position
      }
      }
        delay(1000);
    }

    After that we add the distance sensor’s code and the audio code. Though hearing quite easy but it taken most of our time and the code is in an incredible length.                                                                  #include <SoftwareSerial.h>
    #define PIR_MOTION_SENSOR 8 //Use pin 2 to receive the signal from the module
    #define pin A5

    #define LED 13// this LED will light up when the sensor detects movement
    int sensorPin = A0;
    int sensorValue = 0;
    #include <Servo.h>
    #include <SoftwareSerial.h>

    Servo myservo1;
    Servo myservo2;

    int pos = 0;

    //int num = random(1, 12);
    int num = 1;

    SoftwareSerial mp3(2, 3); // modify this with the connector you are using.
    boolean someoneThere = false;
    boolean someoneWasThere = false;
    void setup() {

      myservo1.attach(9);
      myservo2.attach(11);
      Serial.begin(9600);

      pinMode(5, OUTPUT);
      pinMode(4, OUTPUT);
      pinMode(6, OUTPUT);

      mp3.begin(9600);
      Serial.begin(9600);
      delay(100);
      if (true == SetPlayMode(0x00))
        Serial.println(“Set The Play Mode to 0x00, Single Loop Mode.”);
      else
        Serial.println(“Playmode Set Error”);
      PauseOnOffCurrentMusic();
      randomSeed(analogRead(0));
      pinMode(PIR_MOTION_SENSOR, INPUT);
      pinMode(LED, OUTPUT);
      SetVolume(0x1F);

    }

    void loop() {

      sensorValue = analogRead(A0);
      Serial.print(“Moisture = ” );
      Serial.println(sensorValue);

      sensorValue = analogRead(0);

      if (isPeopleDetected()) { //if it detects the moving people?

        digitalWrite(LED, HIGH);

        // someone there is now true

        someoneThere = true;

        Serial.println(num);

        SetMusicPlay(00, (uint8_t) num);

        delay(3000); // this delay is for the MP3 file

      } else {

        someoneThere = false;

        someoneWasThere = false;

        // Serial.println(“no one”);

        digitalWrite(LED, LOW);

        //PauseOnOffCurrentMusic();

      }

      if (someoneThere == true && someoneThere != someoneWasThere) {

        Serial.println(“someone is there!”);

        someoneWasThere = true;

      }

    }

    //Set the music index to play, the index is decided by the input sequence

    //of the music;

    //hbyte: the high byte of the index;

    //lbyte: the low byte of the index;

    boolean SetMusicPlay(uint8_t hbyte, uint8_t lbyte)

    {

      mp3.write(0x7E);

      mp3.write(0x04);

      mp3.write(0xA0);

      mp3.write(hbyte);

      mp3.write(lbyte);

      mp3.write(0x7E);

      delay(10);

      while (mp3.available())

      {

        if (0xA0 == mp3.read())

          return true;

        else

          return false;

      }

    }

    // Pause on/off the current music

    boolean PauseOnOffCurrentMusic(void)

    {

      mp3.write(0x7E);

      mp3.write(0x02);

      mp3.write(0xA3);

      mp3.write(0x7E);

      delay(10);

      while (mp3.available())

      {

        if (0xA3 == mp3.read())

          return true;

        else

          return false;

      }

    }

    //Set the volume, the range is 0x00 to 0x1F

    boolean SetVolume(uint8_t volume)

    {

      mp3.write(0x7E);

      mp3.write(0x03);

      mp3.write(0xA7);

      mp3.write(volume);

      mp3.write(0x7E);

      delay(10);

      while (mp3.available())

      {

        if (0xA7 == mp3.read())

          return true;

        else

          return false;

      }

    }

    boolean SetPlayMode(uint8_t playmode)

    {

      if (((playmode == 0x00) | (playmode == 0x01) | (playmode == 0x02) | (playmode == 0x03)) == false)

      {

        Serial.println(“PlayMode Parameter Error! “);

        return false;

      }

      mp3.write(0x7E);

      mp3.write(0x03);

      mp3.write(0xA9);

      mp3.write(playmode);

      mp3.write(0x7E);

      delay(10);

      while (mp3.available())

      {

        if (0xA9 == mp3.read())

          return true;

        else

          return false;

      }

    }

    //return distance (cm)
    double get_IR (uint16_t value) {
      if (value < 16)  value = 16;
      return 2076.0 / (value – 11.0);
    }

    /***************************************************************

      Function: Detect whether anyone moves in it’s detecting range

      Return:-boolean, true is someone detected.*/

    boolean isPeopleDetected() {

      uint16_t value = analogRead (pin);
      double distance = get_IR (value);
      int moistureSensor = analogRead(A0); //moisture

      Serial.println(distance);
      int sensorValue = digitalRead(PIR_MOTION_SENSOR);

      //put here the value of the moisture sensor

      //if (sensorValue == HIGH) //if the sensor value is HIGH?
      if (distance < 50 && moistureSensor > 620) {
       
        analogWrite(5, 200);
        analogWrite(4, 0);
        analogWrite(6, 0);
        for (pos = 0; pos <= 180; pos += 1) {
          myservo1.write(pos);
          delay(15);
        }
        for (pos = 90; pos >= 0; pos -= 1) {
          myservo1.write(pos);
          delay(15);
        }
        num = 2;
        return true;//yes,return true

       

      } else if (distance < 50 && moistureSensor < 590) {
       
        analogWrite(6, 200);
        analogWrite(5, 0);
        analogWrite(4, 0);
       
        for (pos = 0; pos <= 180; pos += 1) {
          myservo2.write(pos);
          delay(15);
        }
        for (pos = 90; pos >= 0; pos -= 1) {
          myservo2.write(pos);
          delay(15);
        }
        num = 1;
        return true;//yes,return true

       

      } else if (distance < 50 && moistureSensor < 620 &&  moistureSensor > 590) {

        analogWrite(4, 200);
        analogWrite(5, 0);
        analogWrite(6, 0);

      } else {

      }
      return false;//no,return false

    }                                                                                                                                       During coding many time I want to give it up, but thanks to my partner, she really did s good job in it. What’s more the 3D-printer was also drive me crazy, we fail four time to print the first piece, and we have grind the piece so long time to get them fit each other.

  2. We receive mane useful advice in the user test, like make a lighter hand, add an Infrared Distance Sensor. THat’s all really helpful.
  • CONCLUSIONS:
  1. This project take the plants’ situation-the humidness as its input, the electricity waves in the circuit as the processing, the showing on the light , sound and motion as the output. This device approximately get my exception.
  2. To improve that, I hold I can make it more steady to support and size of the pot while itself can smaller and delicate.
  3. This experiment taught me that though it might looks impossible to realize you idea I the first step, but all the object in the world is a continuums, just try every effort on the next step and you will finally make it.
  4. from

    to

  5.