Recitation 3: Sensors – Audrey Samuel

For our third recitation we were asked to choose a sensor and build a circuit that integrated our chosen sensor with our Arduino. We were reminded to refer back to previous lessons and make sure we had to map() an analog input. Tian Tian and I chose the Ultrasonic Ranger which is used to detect distance. We used the Ping example in Arduino to help us and chose a buzzer to be our output. 

We began by placing the ultrasonic ranger into the breadboard. The ultrasonic ranger had four different prongs which we had to pay close attention to. The first prong was ground and so using jumper cables we pinned it from Ground on the ultrasonic ranger to Ground on the Arduino Uno. The next two prongs were the Trig and Echo pins which we were tasked to place in the same Digital Pin in our Arduino. We were confused as to how we could place both of these into one pin but with the help of the learning assistant we realized that we could use another jumper wire, connect it to a random pin on the breadboard and connect the trig and echo pins to it we could send it to the same digital pin. 

We then placed the buzzer into the breadboard ensuring that the positive side was connected by a jumper wire into digital pin 11 and the negative to Ground. We then uploaded the Ping code which were able to access under the Examples section in Arduino. We made sure we modified the pingpin location to digital Pin 13 as that was where we had connected both the Trig and Echo pin. In order to check if our ultrasonic ranger was working we clicked on the serial monitor and we noticed that it provided various readings of distance depending on how close or how far we placed a random object near it.

We had a few issues however with the connecting the buzzer as a form of output because we did not know the appropriate edits to make to the code. We were unable to make the code work during recitation so I met up with a Learning Assistant later that week and learnt how to rewrite the code properly. I later learned I had to define the “buzzer” and the digital pin I connected it to, as well as use the “If” function. We changed the code to activate the buzzer if the object was less than 37cm from the ultrasonic ranger. With the tone function we were also able to change the frequency of the buzzer. 

if (cm<37) {
tone (buzzer, 1500, 100);
} else if (cm.337) {
noTone(buzzer); 

Schematic for Circuit

Question 1:

We decided we would use a buzzer as our form of output when using the ultrasonic ranger. This reminded me of the beeping sound a car makes when it is reversing or parking as it alerts the driver by beeping loudly when the back of the car is close to a wall etc. We would also use this in museums in front of paintings or artwork to ensure that people do not step too close to the artwork. If they do get closer the buzzer or alarm would go off, alerting security. 

Question 2:

Code can indeed be described as following a recipe or tutorial because it is a step by step process. If we leave one ingredient or one bracket out, the entire code may not work and so in order to make sure our code works properly we have to go through it step by step. In addition to this certain things or procedures must come first before other things as can be seen when coding as the void(setup) function should come first before void(loop). 

Question 3:

Manovich in Language of New Media shows us the effects of the computer on humans and how the identity of media has changed over the years. He refers to Theodore Adorno’s theory of the culture industry whereby demands of the individual controls the market and he illustrates this by using the example of a car. A customer might provide the design of their dream car to a showroom however they do not instantly receive this imagined car after designing it as it still has to go to the factory to be built and then returned back to the showroom to be collected by the customer. On the other hand, with the computer this immediacy with obtaining results is possible as the computer is both the showroom and the factory because data can be sent through wires at the “speed of light”. The ease with which humans now receive information has made us more and more dependant on the computer, making us less willing to find information on our own or learn things without looking it up online. 

Leave a Reply