Recitation 3: Sensors

Recitation Exercise:

For this recitation’s exercise, please work with a partner. Choose one of the sensors listed below and read about what it is and how it performs. Once you have picked a sensor, build a circuit that integrates this sensor with your Arduino. Use the data (input) from your sensor to drive an output (Servo-motor, LEDs, Buzzer, etc.). Document the finished circuit and your interaction with it. In addition, draw a diagram of how all the components are connected and add this to your documentation. If you finish your circuit early, you may answer the documentation questions or try your circuit with a different sensor. Please cite any sources you reference to do this exercise.

For these circuits, think back to the lessons from class, such as how to map() an analog input, as well as how to set an analog output with an analog input. This can be seen in the example AnalogInOutSerial (Arduino>File>Examples>0.3Analog>AnalogInOutSerial).


  • Moisture Sensor:The Moisture Sensor can be used as if you were doing simple analog read. Connect the sensors’ power and ground pins to the Arduino’s power and ground, respectively. This sensor’s signal pin can then be connected to an analog input pin.


  • Infrared Distance Sensor:  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.


  • Vibration Sensor:  To create a Vibration Sensor you will need a piezo disk and a 1 mega ohm resistor. You can use the Knock example (Arduino>File>Examples>0.6Sensors>Knock). Otherwise, the Vibration Sensor can be used like a simple Analog input.


  • Ultrasonic Ranger:  The Ultrasonic Ranger (AKA Ultrasonic Sensor OR  HC-SR04) can be used to detect distance. To program Arduino to work with this sensor,  you can use the Ping example ( Arduino>File>Examples>0.6Sensors>Ping). Note: In order for the HC-SR04 to work with the Ping code, you must connect both Trig and Echo to the same Digital Pin in your Arduino.


  • 3-Axis Analog Accelerometer:  For the Grove 3-Axis Accelerometer (3-Axis Analog Accelerometer) you can use the ADXL3xx example (Arduino>File>Examples>0.6Sensors>ADXL3xx).


  • Joystick Module:  The Joystick module comprised of two potentiometers which gauge motion along the x and y axis, and a pushbutton for the z axis. Because of this composition, it can be interfaced with Arduino just as any potentiometer or button normally would.



Please answer each of these questions. Add your answers to your blog post, along with the other documentation for the circuits that you built in class.


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?


Question 2:

Can you identify your circuit with any device you interact with in your daily life? How might your circuit be used to have a meaningful interaction?


Question 3:

How is code similar to following a recipe or tutorial?


Question 4:

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?

One thought on “Recitation 3: Sensors

Leave a Reply