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

Sound Sensor
[Lego]

Files

file  LEGOSND-driver.h
 

SMUX driver for the Lego Sound sensor.


Functions

int SNDreadRaw (tMUXSensor muxsensor)
int SNDreadNorm (tMUXSensor muxsensor)
void SNDsetDBA (tMUXSensor muxsensor)
void SNDsetDB (tMUXSensor muxsensor)

Detailed Description

Sound Sensor


Function Documentation

int SNDreadNorm ( tMUXSensor  muxsensor )

Get the processed value from the sensor.

Parameters:
muxsensorthe SMUX sensor port number
Returns:
processed value of the sensor or -1 if no valid range has been specified.
Examples:
LEGOSND-SMUX-test1.c.

Definition at line 57 of file LEGOSND-driver.h.

int SNDreadRaw ( tMUXSensor  muxsensor )

Get the raw value from the sensor

Parameters:
muxsensorthe SMUX sensor port number
Returns:
the raw value of the Sound Sensor
Examples:
LEGOSND-SMUX-test1.c.

Definition at line 47 of file LEGOSND-driver.h.

void SNDsetDB ( tMUXSensor  muxsensor )

Set the mode of the sensor to DB, this is done by switching on DIG0.

Parameters:
muxsensorthe SMUX sensor port number
Examples:
LEGOSND-SMUX-test1.c.

Definition at line 78 of file LEGOSND-driver.h.

void SNDsetDBA ( tMUXSensor  muxsensor )

Set the mode of the sensor to DBA, this is done by switching off DIG0.

Parameters:
muxsensorthe SMUX sensor port number
Examples:
LEGOSND-SMUX-test1.c.

Definition at line 68 of file LEGOSND-driver.h.