brian.sensors.NXT.SoundSensorNXT
SoundSensorNXT class objects
Class for interacting with NXT sound sensor.
Sensor is automatically registered in the constructor of the base class and un-registered in its destructor. It can also be unregistered with the SoundSensorNXT.close_sensor() function.
There can be at most one instance at any given time, of any sensor class per port in the entire program.
__init__
Initialize an NXT sound sensor at the given port.
Arguments:
port
: Sensor port to which the sensor is attached.
sound_intensity
Measures incoming sound.
Raises:
brian.sensors.SensorIsNotReadyError
: If the sensor is not ready.
Returns:
Value in range 0-1, with 0 being the quietest and 1 being the loudest.