Code:-
int Bulb = 9; // signal to drive relay
int soundsensor = 7; // input from sound sensor
boolean state = false;
void setup()
{
pinMode(Bulb, OUTPUT);
pinMode(soundsensor, INPUT);
}
void loop()
{
if (digitalRead(soundsensor) == LOW)
{
delay(100);
state = !state;
digitalWrite(Bulb, state);
}
}
which software used to program and how to excute this program sir
ReplyDeleteYou have to use Arduino software
ReplyDelete