tape Module

Files:

Interface:

Function: GetTapeValue
Arguments: Character representing the LEFT, RIGHT, or REAR tape sensor
Returns: Integer representing the AD value of the tape sensor(0-1023)
Description:Reads the AD port of the requested sensor.

Function: GetTapeValue
Arguments: Character representing the LEFT, RIGHT, or REAR tape sensor
Returns: Character representing the tape color
Description:Determines the color detected by the requested tape sensor.

Pseudo-Code:

 
int GetTapeValue(char sensor)
   Return value on sensor's AD port
  
char GetTapeColor(char sensor)
   Set White, Green, and Black sensor thresholds for sensor
   Return WHITE, GREEN, BLACK, or GREEN_TAPE for sensor depending on thresholds