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  hitechnic-eopd.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 HTEOPDLRType = sensorAnalogActive
TSensorTypes HTEOPDSRType = 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:
hitechnic-eopd-SMUX-test1.c, and hitechnic-eopd-test1.c.

Definition at line 95 of file hitechnic-eopd.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 107 of file hitechnic-eopd.h.

int HTEOPDreadRaw ( tSensors  link )

Get the raw value from the sensor

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

Definition at line 73 of file hitechnic-eopd.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 84 of file hitechnic-eopd.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:
hitechnic-eopd-SMUX-test1.c, and hitechnic-eopd-test1.c.

Definition at line 142 of file hitechnic-eopd.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 153 of file hitechnic-eopd.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:
hitechnic-eopd-SMUX-test1.c, and hitechnic-eopd-test1.c.

Definition at line 119 of file hitechnic-eopd.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 130 of file hitechnic-eopd.h.


Variable Documentation

TSensorTypes HTEOPDLRType = sensorAnalogActive

Definition at line 53 of file hitechnic-eopd.h.

TSensorTypes HTEOPDSRType = sensorAnalogInactive

Definition at line 54 of file hitechnic-eopd.h.