Measures sound level from the NXT sound sensor
Simulink® Support Package for LEGO® MINDSTORMS® EV3 Hardware / NXT Sensors

The NXT Sound Sensor block reads the sound level measured by the NXT sound sensor connected to LEGO MINDSTORMS EV3 brick.
During simulations without hardware, this block emits zeros. See Block Produces Zeros or Does Nothing in Simulation.

Open the legoev3nxtlib block library and copy the
NXT Sound Sensor block to a new model.
Open the legoev3lib block library and copy the
Display block
to the same model and connect these blocks.
Connect the sound sensor to port 1 of the EV3 brick.
Prepare and run the model on the EV3 brick as described in Run Model on EV3 Hardware.
Move closer to the sensor and make sounds. Observe the measurements on the LCD display of the EV3 brick.
Select the EV3 sensor port to which the sensor is connected. Avoid
assigning multiple devices to the same port. The options are
1, 2,
3, or
4.
Select the type of sound data to output:
Normalised (0 - 100) outputs
the intensity of the sound on a scale from
0 to 100.
0 is the weakest intensity and
100 is the strongest
intensity.
Raw A/D (1023 - 0) outputs the
intensity of the sound on a scale from
1023 to 0.
1023 is the weakest intensity and
0 is the strongest intensity.
Specify how often the block reads sensor values. This value defaults
to 0.1. Shorter sample times, such as
0.01, may produce unreliable measurements.
Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.