AME 3623: Project 2

For this project, you will be reading analog data from an infrared distance sensor (made by Sharp) and modeling the relationship between the analog values and the distances.

Each group will be issued two Sharp sensors.

At the end of this project, you should be able to:

Component 1: Microcontroller Circuit

Connect two Sharp infrared distance sensors to your circuit board. Mark the sensors as "left" and "right so you know which sensor is which. The coloring of the wires varies from connector to connector. In general:

Wiring:

Component 2: Analog Interface Software for Data Collection

Write a data collection program:

Component 3: Data Collection

Component 4: Sensor Model

Given the data that you collected, derive a mathematical equation for distance as a function of sensor value. Keep in mind:

Component 5: Analog Interface Software

Define a new variable type in "project.h":
typedef enum {
   DISTANCE_LEFT = 0,
   DISTANCE_RIGHT = 1
}DistanceSensor;

DistanceSensor is the variable type. DISTANCE_LEFT and DISTANCE_RIGHT are the two values that DistanceSensor variables can take on.

Implement the following function:

Component 6: Testing

Write a new test loop() function that repeatedly:

Then:


What to Hand In

Submit to your project2 folder of your subversion tree by Thursday, February 23rd at 8:55 am: Other components:

Grading


andrewhfagg -- gmail.com

Last modified: Wed Feb 15 17:14:55 2017