Recitation #3 Sensors, Megan See

Materials:

1 * Arduino Uno

1 * Breadboard

1 * Infrared Distance Sensor

Infrared Distance Sensor

For the Infrared Distance Sensor, which was the first sensor my partner and I tried, we did not need many materials.

IMG_0427.TRIM

^video of my partner moving her hand closer and farther away from the sensor and the output changing on the screen

 

^after connecting the sensor to the arduino board

^code we used for the sensor

//connect gp2d120x to A1
#define pin A1

void setup () {
        Serial.begin (9600);
        pinMode(pin, INPUT);
}

void loop () {
        uint16_t value = analogRead (pin);
        double distance = get_IR (value); //Convert the analog voltage to the distance
        Serial.println (value);                 //Print the data to the arduino serial monitor
        Serial.print (distance);
        Serial.println (" cm");
        Serial.println ();
        delay (500);                            //Delay 0.5s
}

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

/******** end code ********/

Question 1:

We made a distance sensor that could figure out and print how far the sensor was from an object, or for example, my partner’s hand in the video. The first thing that popped into my head is when someone is at an art gallery there are often taped lines around a display. The distance sensor could be connected to a speaker and when someone is too close it could go off and let the observer or security guard know something is wrong. 

Question 2:

I think that this is true, and a very similar concept a video we watched in class where the “chef” who was really a computer scientist, made a cooking tutorial and explained how each part was related to a process of coding and what they did. Every function and variable had a purpose and sends information to somewhere else. The different foods are the different variables and after cooking or putting them together, they are a different food that serves a new purpose.

Question 3:

There are many ways that we can see how computers have had a direct influence on humans. Our habits significantly changed when pocket computers, or smartphones became a normal part of daily life. wake up, check your phone, get dressed, check your phone, take the subway to school while on your phone. Things we do everyday like play music, find directions, message our friends, do homework assignments, etc all involve computer technology. It also increased the speed in which humans do things. Emailing and texting make communication much faster. Online submissions for school make papers easier to turn in. Research papers are suddenly not as hard because all on the information is right at your finger tips.

Leave a Reply