Overview   Project   Class   Tree   Index 
NXT C++ Bluetooth Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

NXT C++ Bluetooth Library
Class Sound

Sensor
   |
   +--Sound

   in sound.h

class Sound
extends Sensor

Class for NXT sound sensor


 
Fields inherited from class Sensor
has_init, connection, sensor_type, sensor_mode, sensor_port, raw_AD_value, normalized_AD_value, scaled_value, calibrated_value
 
Constructor Summary
Sound( Sensor_port port, Connection* connection, Sound_mode sound_mode = DBA_MODE )
          Constructor for the sound sensor (percent mode and DBA_MODE is default)
~Sound()
          
 
Method Summary
 string print()
          Get the sensor reading as a string (init method will be called if the sensor has not been initialized)
   
Methods inherited from class Sensor
init, read, read, print, set, get_port, get_mode, set_type_and_mode, get_sensor_value, read_mode, read_raw, read_normalized, get_type, reset, get_i2c_address
 

Constructor Detail

Sound

public Sound( Sensor_port port, Connection* connection, Sound_mode sound_mode = DBA_MODE );
Constructor for the sound sensor (percent mode and DBA_MODE is default)
Parameters:
port - [which sensor port to use]
*connection - [attach a connection]
sound_mode - [set the sound mode to either DB_MODE or DBA_MODE (default is DBA_MODE)]

~Sound

public ~Sound();


Method Detail

print

public string print();
Get the sensor reading as a string (init method will be called if the sensor has not been initialized)
Returns:
sensor reading as a string + either " dBA" or " dB"

 Overview   Project   Class   Tree   Index 
NXT C++ Bluetooth Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD