Datasheet

IDUINO for Maker’s life
www.openplatform.cc
Here is a example show that you can control the LED blinking connected with pin 13
and pin12. Open the Serial Monitor, you will see the signal value, when the sounds
reaches certain values, the corresponding led is lighting. The certain value depends on
your variable resistor that can be adjusted.
********Code begin********
int Led=13;
int ledPin=12;
int buttonpin=7;
int sensorPin = A5;
int sensorValue = 0;
int val;
void setup()
{
Serial.begin(9600);
pinMode(Led,OUTPUT);
pinMode(ledPin, OUTPUT);
pinMode(buttonpin,INPUT);
}
void loop()
{
sensorValue = analogRead(sensorPin);
digitalWrite(ledPin, HIGH);
delay(sensorValue);
digitalWrite(ledPin, LOW);
delay(sensorValue);