
MODULO DETECTOR DE SOM ARDUINO FUNDUINO
Disponivel
3,44€
€3,10
Promoção válida de 01-04-2025 a 30-04-2025
Leiria
Coimbra
ref: KY0037
Descrição
Módulo detector de som para ARDUINO/FUNDUINO
- Exemplo de código: Saída digital
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);
}
}
Código de exemplo: Saídas analógicas
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);
}
Ficha Técnica
Para o módulo de detecção de som, existem duas saídas:
1. AO, saída analógica, o sinal de tensão de saída em tempo real do microfone
2. FAÇA, quando a intensidade do som atingir um certo limiar, o sinal alto e baixo de despesa
- Parafuso de montagem de 3 mm
- Fonte de alimentação 5V DC
- Saída analógica
- Indicador de limiar de saída LED
- Microfone de alta sensibilidade
- Luz indicadora de alimentação
- Saída do comparador digital
Partilhe este artigo em: