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 has been issued two Sharp sensors. In most cases, these are already attached to your hovercraft frame. You may remove them from the frame if it facilitates testing.

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

Component 0: Library Installation

Create a new project in your Arduino environment.

You will not need to repeat these steps in the future for this library (although we will install others later).

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 {
   SHARP_LEFT = 0,
   SHARP_RIGHT = 1
}SharpSensor;

SharpSensor is the variable type. SHARP_LEFT and SHARP_RIGHT are the two values that SharpSensor variables can take on.

Implement the following function:

Component 6: Testing

Write a new version of the sensor_display_step() function that:

Then:

Hints


What to Hand In

Submit to your project2 folder of your dropbox tree by Thursday, February 20th at 5:00pm: Other components:

Grading


andrewhfagg -- gmail.com

Last modified: Thu Feb 13 14:05:26 2020