In this recitation, my partner Eric and I chose the infrared distance sensor and build a circuit that integrates it with my Arduino. The basic information of the infrared distance sensor is listed below.
“Similar to the Moisture Sensor, the Infrared Distance Sensor can by used by implementing the connections and code from a simple analog read sketch. In the case of Infrared Distance Sensors, using the “map()” function can be helpful. This function maps the analog readings from the sensor to the distance between the sensor and the object.”
After reading this material given on the recitation website, we decided to use one LED as the output of our circuit, hoping that the light of the LED could show the distance from the sensor to the object. We started to build the circuit and the diagram is shown below.
Materials:
1* Arduino Uno
1* breadboard
1* LED
1* 10K ohm Resistor
1* infrared distance sensor
wires
At first, we have no idea what is the “object” mentioned in the material above and we don’t know how could the sensor measure distance from the object to itself. Therefore, we asked Professor Eric for help. He gave us a detailed explanation and we finally got some basic ideas.
After we finished the building of the circuit, my partner Eric made some modifications in the code to let the LED work. However, it seemed that there was something wrong with the sensor since the LED was not changing the brightness with the distance.
Again, with the help of Professor Eric, we discovered that the failure was due to one error in our code—— we used “digitalWrite” instead of “analogWrite”, so that the light could only be on or off. After we corrected the error, the circuit finally worked.
Questions:
Question 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?
Answer: My partner and I decided to build a circuit in which the light of the LED could show the distance from the sensor to the object.To utilize it in real life, we can make it as an alarm. If someone is unconsciously approaching a dangerous object, the light will get brighter and brighter.
Question 2: Code is often compared to following a recipe or tutorial. Why do you think that is?
Answer: The operation of a code needs to follow an specific order, and every step of it is important. Even one small error in the code could lead to the failure of operating it, which is similar to the process of cooking.
Question 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?
Answer: After the third revolution of science and technology, the computer has become a crucial part of human life. The development of it greatly enhanced the human productivity, providing more convenient methods to collect information, solve real life problems and create new inventions. Humans tend to rely on computers for help, which is due to the huge impact of the internet to a great extent.