Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Functions | Variables

EOPD Sensor
[HiTechnic]

Files

file  HTEOPD-driver.h
 

HiTechnic EOPD Sensor driver.


Functions

int HTEOPDreadRaw (tSensors link)
int HTEOPDreadProcessed (tSensors link)
void HTEOPDsetShortRange (tSensors link)
void HTEOPDsetLongRange (tSensors link)
int HTEOPDreadRaw (tMUXSensor muxsensor)
int HTEOPDreadProcessed (tMUXSensor muxsensor)
void HTEOPDsetShortRange (tMUXSensor muxsensor)
void HTEOPDsetLongRange (tMUXSensor muxsensor)

Variables

TSensorTypes LRType = sensorAnalogActive
TSensorTypes SRType = sensorAnalogInactive

Detailed Description

HiTechnic EOPD Sensor


Function Documentation

int HTEOPDreadProcessed ( tSensors  link )

Get the processed value from the sensor. This is obtained by using sqrt(raw value * 10)

Parameters:
linkthe HTEOPD port number
Returns:
processed value of the sensor
Examples:
HTEOPD-SMUX-test1.c, and HTEOPD-test1.c.

Definition at line 94 of file HTEOPD-driver.h.

int HTEOPDreadProcessed ( tMUXSensor  muxsensor )

Get the processed value from the sensor. This is obtained by using sqrt(raw value * 10)

Parameters:
muxsensorthe SMUX sensor port number
Returns:
processed value of the sensor

Definition at line 106 of file HTEOPD-driver.h.

int HTEOPDreadRaw ( tSensors  link )

Get the raw value from the sensor

Parameters:
linkthe HTEOPD port number
Returns:
raw value of the sensor
Examples:
HTEOPD-SMUX-test1.c, and HTEOPD-test1.c.

Definition at line 72 of file HTEOPD-driver.h.

int HTEOPDreadRaw ( tMUXSensor  muxsensor )

Get the raw value from the sensor

Parameters:
muxsensorthe SMUX sensor port number
Returns:
raw value of the sensor

Definition at line 83 of file HTEOPD-driver.h.

void HTEOPDsetLongRange ( tSensors  link )

Set the range of the sensor to long range, this is done by configuring the sensor as sensorLightActive and setting it to modeRaw

Parameters:
linkthe HTEOPD port number
Examples:
HTEOPD-SMUX-test1.c, and HTEOPD-test1.c.

Definition at line 141 of file HTEOPD-driver.h.

void HTEOPDsetLongRange ( tMUXSensor  muxsensor )

Set the range of the sensor to long range, this is done by setting dig0 high (1).

Parameters:
muxsensorthe SMUX sensor port number

Definition at line 152 of file HTEOPD-driver.h.

void HTEOPDsetShortRange ( tSensors  link )

Set the range of the sensor to short range, this is done by configuring the sensor as sensorRawValue

Parameters:
linkthe HTEOPD port number
Examples:
HTEOPD-SMUX-test1.c, and HTEOPD-test1.c.

Definition at line 118 of file HTEOPD-driver.h.

void HTEOPDsetShortRange ( tMUXSensor  muxsensor )

Set the range of the sensor to short range, this is done by switching off dig0

Parameters:
muxsensorthe SMUX sensor port number

Definition at line 129 of file HTEOPD-driver.h.


Variable Documentation

TSensorTypes LRType = sensorAnalogActive

Definition at line 52 of file HTEOPD-driver.h.

TSensorTypes SRType = sensorAnalogInactive

Definition at line 53 of file HTEOPD-driver.h.