Inter Lab | Recitation 3

Circuit Documentations

In this recitation, I chose the vibration sensor and built a circuit around it. With the help of the vibration sensor introduction on Arduino, building the circuit isn’t difficult. Instead of using the code provided in the example, I used the code learned on Thursday’s class and made some changes to it. I used the map() function to let the vibration sensor control the frequency of buzzer and the brightness of LED. There was one problem when I used pin 9 as the output of buzzer and pin 11 as the output of LED, only the buzzer can work, while the LED had no light. I asked the professor for help, we checked all the equipments and coding part to be fine. After looking up on the internet, we found out that the timer was conflicting the output of LED when using pin 9 and 11 at the same time. So we then used pin 5 instead of 11 and the whole circuit worked well.

const int vibration = 0;

const int buzzer = 9;

const int light = 5;

int brightness = 0;

int value = 0;

int loud = 0;


void setup() {

  Serial.begin(9600);
  
  pinMode (light, OUTPUT);

}

void loop() {

  value = analogRead(vibration);

  loud = map(value, 0, 400, 1, 24);

  brightness = map(value, 0, 400, 0, 255);


  Serial.println(brightness);

  tone(buzzer, 440 * loud, 1000);

  analogWrite(light, brightness);
  
  delay(100);
}

Answers to the Questions

1. What did you intend to assemble in the recitation exercise? If your sensor/actuator combination were to be used for pragmatic purposes, who would use it, why would they use it, and how could it be used?

I intend to built a circuit that the buzzer and LED can have reactions to the knock and press of the vibration sensor. I think this circuit can be used as an alarm in real life. When certain object is touched, there will have sounds and lights in order to alert the user. For example, this can be equipped on a safe box containing dangerous objects like lighter and iron. If the child at home accidentally touches the safe box, there will immediately be noice and lights to alert the parents as well as the child.

2. Code is often compared to following a recipe or tutorial.  Why do you think that is?

I think that the computer will act according to the code given, just like chief will cook with the recipe or students do work depending on the tutorial. The code is the guideline for the computer to operate. Just like recipe and tutorial, the code itself would run or function, but it can tell the computer to run accordingly.

3. In Language of New Media, Manovich describes the influence of computers on new media. In what ways do you believe the computer influences our human behaviors?

No doubt that computers have changed human life completely in nearly every aspects. Human now depends on computer a lot for so many things. Human let the computers to do many basic things instead of manually. For the most simple example, with a powerful calculator, we no need to do calculations by ourself, and our ability of calculating may even decline because of the computer. We tend to type in words instead of writing it down on paper, so we may feel weird when holding a real pen to sign the name. Therefore, I think many basic things human used to practice has been replaced by computers, this is for sure more convenient and efficient, but at the same time, it also means that human may lose the ability to those basic things since there exists fewer chances for us to practice.

Leave a Reply

Your email address will not be published. Required fields are marked *