Microphone Sound Sensor explained | HW-484 | Interfacing with ESP 8266
Microphone Sound Sensor In this tutorial, we will learn about microphone sound sensor which is used to measure sound intensity. The sensor takes in ambient sound and provides a voltage corresponding to intensity in both digital and analog outputs. We will see both cases of outputs. Case 1 : Using Digital Output In this we will try to lit an Led if the voltage output is above a threshold. Parts Needed 1. ESP 8266 NodeMCU 2. 330 Ohms resistor 4. HW 484 Sensor 5. Power supply 3.3v/5v 6. Led 7. Jumper wires and bread board Connections Power supply 3.3V - HW484 + Power supply Gnd - HW484 G NodeMCU D4 - HW484 D0 NodeMCU D2 - 330 Ohms Resistor - Led CODE boolean soundValue = 0 ; void setup ( ) { pinMode ( D2 , OUTPUT ) ; pinMode ( D4 , INPUT ) ; Serial . begin ( 115200 ) ; } void loop ( ) { soundValue = digitalRead ( D4 ) ; Serial . println ( soundValue ) ; if ( soundValue == HIGH ) { di...