icommand.nxt
Class SoundSensor

java.lang.Object
  extended by icommand.nxt.SoundSensor

public class SoundSensor
extends java.lang.Object


Constructor Summary
SoundSensor(SensorPort 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoundSensor

public SoundSensor(SensorPort sensor)
Used to detect the loudness of sounds in the environment.

Parameters:
sensor - e.g. Port.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


Copyright © 2006. All Rights Reserved.