icommand.platform.nxt
Class Sound

java.lang.Object
  extended by icommand.platform.nxt.Sound

public class Sound
extends java.lang.Object


Constructor Summary
Sound(Sensor sensor)
          Used to detect the loudness of sounds in the environment.
 
Method Summary
 int getdB()
          Returns the decibels measured by the sound sensor.
e.g.
 int getdBA()
          Returns sound within the human hearing frequency range, normalized by A-weighting.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sound

public Sound(Sensor sensor)
Used to detect the loudness of sounds in the environment.

Parameters:
sensor - e.g. Sensor.S1
Method Detail

getdB

public int getdB()
Returns the decibels measured by the sound sensor.
e.g. Whispering = 20 dB
Vacuum cleaner = 80 dB
Jet engine = 150 dB
NOTE: Uncertain if PCTFILLSCALEMODE is producing accurate dB values.

Returns:
dB - decibels

getdBA

public int getdBA()
Returns sound within the human hearing frequency range, normalized by A-weighting. Extremely high frequency or low frequency sounds are not detected with this filtering (regardless of loudness).

Returns:
dB(A) - decibels with A-weighting