소리 검출 센서
(Sound Detector Module)
개요
- 본 제품은 소리를 검출하는 센서입니다.
- 소리를 센싱하여 소리가 들리면 LED를 켜거나 등의 무엇인가 액션을 취하고자 할때 사용이 가능한 센서입니다.
- 아날로그 전압 출력 및 디지털 출력이 있으며, 아날로그 전압 출력은 장착된 마이크로폰 신호의 실시간 전압 출력이며, 디지털 출력은 특정 값 이상의 소리 강도가 들리는 정도에 따라 high/low 를 출력합니다.
- 특정 소리 강도는 장착된 포텐셔미터를 이용하여 설정할 수 있습니다.
특징
- 1. There is a mounting screw hole 3mm
2. The use 5v DC power supply
3. With analog output
4. There are threshold level output flip
5. High sensitive microphone and high sensitivity.
6. A power indicator light
7. The comparator output is light
문서
- example 1: digital ouput
int Led = 13 ;// define LED Interface int buttonpin = 3; // define D0 Sensor Interface int val = 0;// define numeric variables val void setup () { pinMode (Led, OUTPUT) ;// define LED as output interface pinMode (buttonpin, INPUT) ;// output interface D0 is defined sensor } void loop () { val = digitalRead(buttonpin);// digital interface will be assigned a value of pin 3 to read val if (val == HIGH) // When the sound detection module detects a signal, LED flashes { digitalWrite (Led, HIGH); } else { digitalWrite (Led, LOW); } }
- example 2: analog ouput
int sensorPin = A0; // select the input pin for the potentiometer int ledPin = 13; // select the pin for the LED int sensorValue = 0; // variable to store the value coming from the sensor void setup () { pinMode (ledPin, OUTPUT); Serial.begin (9600); } void loop () { sensorValue = analogRead (sensorPin); digitalWrite (ledPin, HIGH); delay (sensorValue); digitalWrite (ledPin, LOW); delay (sensorValue); Serial.println (sensorValue, DEC); }
연관제품
- 연관제품 1