Input: Sound Sensor - 图1

What Is It

The sound sensor detects the sound intensity around it, which can be transformed to a form of numbers.

How It Works

It is one of the commonly-seen microphones in our life that can detect the sound intensity in an environment. It converts the analog signal of sound wave into a digital signal in a range from 0-1023. Comparing the sound intensity with a specified, adjustable value, we will know the environment is quiet or noisy. If it is below the value, we know this is a quiet environment and the intensity is regarded as a low threshold; if it is above the value, then we know the environment is noisy and the intensity is regarded as a high threshold.
Try using the low/high threshold to trigger events, e.g. displaying an angry face on LED matrix when being in a noisy environment and a happy face when being in a quiet environment.

Real World Analogy

Human ears, microphone

Codecraft

You can find blocks that control the sound sensor in the tab Sensing in Codecraft.