E2 Laboratory 06

Sensors, Actuators and Psychophysics

Download the folder "Feb25" from the course Google drive folder, and unzip it. We will go over the code in that folder in class.

Task 1: Control a servo motor with the arduino

Demo for me when you are done.

Task 2: The squealer

Set up the force sensitive resistor (you may have to solder wires on to the terminals to get them to fit in the breadboard) in a "voltage divider" arrangement so you can measuer force. Write a program that sounds a tone of increasing frequency as you squeeze the resistor harder. There should be at least three distinct tones (though you can use more). There should be no tone if you are not squeezing. Make generous use of "Serial.println" to figure out the range of values from your sensor as you squeeze.


  1. A demo of the servo program (Task 1).
  2. A demo of you program that squeals as you squeeze i (Task 2)
  3. Turn in your code (with comments) for the squealing program on the moodle page (Task 2)