PROGRAMMING SENSORS
In the week 3 recitation, we used an arduino to build circuits with different sensors.
NEW CHALLENGE
We were no longer allowed to use a breadboard for these circuits. Instead, we had to use a wire connector to connect one part to multiple ports (more on that in the section about building a pressure sensor).
ULTRASONIC RANGER
Goal : To create a circuit that detects the presence of something close by it and measures and displays the distance away. In every day life, a circuit like this would be used in things that require a level of attention to surroundings such as a car sensor. It would likely be coupled with a light or buzzer to alert at certain distances.
1. Assembly
To create this circuit we followed a provided diagram using an ultrasonic ranger, wires, and the arduino board. Link to image & instructions
2. Coding
We typed the code while looking at example code to know exactly where things belonged and why.
Essentially, this code displays the text "Sensor Test" and "ARDUINO UNO"
when it is first setup. Following that, it goes through a loop of identifying and recording the distance of an object that is detected. Finally, it converts the distance that the computer identifies as volts into centimeters and displays that on the Serial Monitor or Plotter.
This step was most challenging because we are still learning the syntax and requirements of programming the arduino. It required us to pay very close attention to the details. For example, when we first tried to upload, it took three tries to verify the code due to missing semicolons and brackets. We also used pseudo-code to outline what variables and functions we needed. However, there were still a few requirements that didn’t come to mind until after comparing our code with the example.
Ultrasonic Ranger Code
REFLECTION
This activity was very helpful in order to teach me the basics of arduino, sensors, and the processing language. Also, with an understanding of how to connect a circuit without a breadboard, the potential for the design of future projects has become much more broad.
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?
Answered in the GOAL section of each circuit
Question 2: Code is often compared to following a recipe or tutorial. Why do you think that is?
Code is comparable to following a tutorial because it is a specific step by step process read by the computer. The order of code matters as the computer must know everything in the correct order to produce the intended result.
Question 3: In The 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?
Our lives are a constant interaction with computers of many sorts. Notably, computers have influenced our desire to connect, create, and explore in new ways. Because of computers, innovation happens at such a quick pace and people are constantly finding unique and innovative ways to improve convenience and accessibility. The biggest difference in human behavior is that we now look to computers for almost all of our problems in order to find a quicker, better, or easier solution.
Leave a Reply