loading

In this article I will talk about the mic module with the arduino.You can practice with several microphone module.There are usually one per module 4.He writes the names on p. 5V Vcc pin plugs eat GND GND pin. The other two pins AO and DO pins are made of the connection pin number defined in the code section. A0 pin to analog, the DO pin is defined as the input pin reading digitally.

Step 1: Sound Sensitive LED Control With Microphone

LED application volume is now the reference will blink for a second.

Step 2: Circuit Diagram:

Connection pins:

Microphone module >>>>Arduino

AO____________________A0

DO____________________D2

VCC __________________5V

GND__________________ GND


Led >>>>>>Arduino

Anode_____D13

Cathode___ GND

Step 3: Software Part:

// Robimek - Robotic Systems - 2016

const int DO_pin = 2;

const int AO_pin = 0;

int ses;

int led = 13;

void setup()

{

pinMode(DO_pin, INPUT);

pinMode(led, OUTPUT);

Serial.begin(9600);

}

void loop()

{

if (ses > 35)

{

digitalWrite(led, HIGH);

delay(1000);

digitalWrite(led, LOW);

}

ses = analogRead(AO_pin);

Serial.print(digitalRead(DO_pin));

Serial.print("-");

Serial.println(analogRead(AO_pin));

}

More information : http://make.robimek.com/use-of-microphone-module-with-arduino/

<p>good sketch but as the friend said initialize int ses = 0; if no ses could have bad data as 27272 at the beginning that&acute;s why is better initialize the variable, and second comment is , test the Analog input <br>ses = analogRead(AO_pin);<br>then the IF statements :) <br></p>
<p>It might be wise to explicitly initialise ses when you declare it</p><p>replace &quot;int ses;&quot; by &quot;int ses=0;&quot;</p><p>then you can be certain that the test for ses&gt;35 at the start of loop will always work correctly (or you can set equal to zero in setup())</p>

About This Instructable

1,681views

23favorites

License:

Bio: Mechanical engineer, Entrepreneur, Maker, robotic systems expert and Robimek founder
More by sezgingul:Arduino Mini CNC  Making Robot Hand With  Plastic Pipes Use of Microphone Module 
Add instructable to: