Difference between revisions of "Sound Sensor"
Qian.zhang (talk | contribs) |
Qian.zhang (talk | contribs) (→Application Ideas) |
||
Line 25: | Line 25: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | [[File:Sound link.jpg]] | ||
==How to buy== | ==How to buy== | ||
Here to buy Sound Sensor on [http://store.linksprite.com/sound-sensor-module-of-linker-kit-for-pcduino-arduino/ store] | Here to buy Sound Sensor on [http://store.linksprite.com/sound-sensor-module-of-linker-kit-for-pcduino-arduino/ store] |
Revision as of 08:56, 23 April 2014
Introduction
The Sound sensor module is a simple microphone. Based on the power amplifier LM386 and the electret microphone, it can be used to detect the sound strength of the environment. The value of output can be adjusted by a potentiometer.
Schematics
Application Ideas
<syntaxhighlight lang="c"> const int ledPin = 12; // the number of the LED pin const int thresholdvalue=400;//The threshold to turn the led on void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
int sensorValue = analogRead(A0);//use A0 to read the electrical signal if(sensorValue>thresholdvalue) digitalWrite(ledPin,HIGH);//if the value read from A0 is larger than 400,then light the LED delay(20); digitalWrite(ledPin,LOW);
} </syntaxhighlight>
How to buy
Here to buy Sound Sensor on store