Recitation 3 – Sensors


For Part A, please find a partner and work in pairs.

Step 1: Choose one of the the following sensors—not provided in your Arduino kit— and read about it. Information about the individual sensors and how to use them can be found in the Information on Sensors and Resources section at the bottom of the post.

Once you have picked a sensor, attach it to your Arduino and use the data from your sensor to turn an output (Servo-motor, LEDs, Buzzer, etc.) on and off.

Step 2: Document the work you have done to the blog. Make sure to document your work individually, and that your documentation responds to the following questions:

  • What did you intend to assemble? Why did you choose that specific sensor and output?
  • Which materials did you use? Which circuit(s) did you use as a reference for them?
  • What sources did you use in order to program them? Did you have to modify them?
  • Which different steps you went through to make it work? Did it work as expected?
  • What conclusions can you draw over the work you did?
  • Can you relate your experience building this circuit to any device you interact in your daily life?
  • If you were to continue experimenting, what would your next steps be?



For this part, you should work individually focusing in the work you have done in Part A. You should post a reflection that addresses the following questions:

  • How is writing code similar to making dumplings?
  • As Manovich describes in the Language of New Media, the influence of computers on new media is clear. In what ways do you believe the computer influences our human behaviors?

Additional Information on Sensors

Moisture Sensor:
The Moisture Sensor can be used as if you were doing simple Analog Read (like the potentiometer from Recitation 2) with any analog device. This is to say, connect the sensors’ power and ground pins to the Arduino’s power and ground, respectively. The signal pin from these sensors can be connected to an Analog Input pin.
Infrared Distance Sensor (IR Proximity 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 it is sensing. For the Sharp Infrared Distance Sensor you can also follow the sample code available here.
Vibration Sensor:
To create a Vibration Sensor you will need a piezo disk and a 1M resistor. You can use the Knock example on your Arduino IDE — under Examples —> 0.6Sensors. 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 on your Arduino IDE — under Examples —> 0.6Sensors.
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 on your Arduino IDE — under Examples —> 0.6Sensors.

Leave a Reply