Intro
During this recitation, we were asked to create a circuit that included a sensor, and later to have an output powered by the sensor. This was so explore the interactive properties that sensors provide within a circuit, and also to challenge us to integrate two different codes together into one.
Materials
1 Breadboard
1 Arduino Uno
1 Buzzer
1 USB A to B cable
1 Ultrasonic Ranger
Jumper cables
Building the Circuit
Building this circuit was a fairly simple process. My partner and I decided to use the ultrasonic ranger as our sensor. We began by building the circuit without the buzzer on the output. We also used the code provided on the website. This was successful, as we saw the distance change on the serial monitor as we moved closer and further away from the sensor. After that, we successfully integrated a buzzer into our circuit, but we ran into trouble with our code. The buzzer would not make any noise. While we had the code for the ultrasonic ranger and a simple code for the buzzer, we had a hard time finding the proper way to combine the two. Finally, after asking for help, we were able to get the buzzer to make a sound. To make it more clear, we added another tone when the sensor read a certain distance. From this, I learned where some common mistakes come in when trying to combine different codes. This includes forgetting to paste something in, or not include a space in the correct place.
Without the buzzer
With the buzzer
The schematic
Question 1
During our recitation exercise, we made a circuit that is similar to an alarm system. The sensor reads distance, and when a certain distance is passed, the buzzer makes noise. A similar circuit could be used with a louder siren to be a home security system.
Question 2
Code is similar to a baking recipe. When baking, it is important to have precise amounts of the ingredients, in a specific order. Code is similar, in that, it has to be precise (ex.) correct punctuation and spelling) and it a certain order (ex.) setup and then loop).
Question 3
Computers impact human behavior directly. Computers have helped make human life much more efficient by providing shortcuts for things that otherwise would take much longer. A great example of this is autocorrect on cellphones. Autocorrect has cut out the need to know exactly how to spell words, as long as you’re close you’re fine. Computers have causes humans to adapt to having help, and in turn has caused us to become more efficient because we are able to focus on other tasks.