int soundSensor = 7;
int LED = 3;
void setup()
{
Serial.begin(9600);
pinMode (soundSensor, INPUT);
pinMode (LED, OUTPUT);
}
void loop()
{
int statusSensor = digitalRead (soundSensor);
if (statusSensor == 1)
{
digitalWrite(LED, HIGH);
Serial.println("Sound");
}
else
{
digitalWrite(LED, LOW);
Serial.println("low Sound");
}
delay(1);
}
int LED = 3;
void setup()
{
Serial.begin(9600);
pinMode (soundSensor, INPUT);
pinMode (LED, OUTPUT);
}
void loop()
{
int statusSensor = digitalRead (soundSensor);
if (statusSensor == 1)
{
digitalWrite(LED, HIGH);
Serial.println("Sound");
}
else
{
digitalWrite(LED, LOW);
Serial.println("low Sound");
}
delay(1);
}
No comments:
Post a Comment