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  lego-sound.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:
lego-sound-SMUX-test1.c.

Definition at line 58 of file lego-sound.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:
lego-sound-SMUX-test1.c.

Definition at line 48 of file lego-sound.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:
lego-sound-SMUX-test1.c.

Definition at line 79 of file lego-sound.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:
lego-sound-SMUX-test1.c.

Definition at line 69 of file lego-sound.h.