Code:-
int Flamepin = 8;
int Buzzer = 11;
int Flame = HIGH;
void setup()
{
pinMode(Flamepin,INPUT);
pinMode(Buzzer,OUTPUT);
Serial.begin(9600);
}
void loop()
{
Flame=digitalRead(Flamepin);
if(Flame==LOW)
{
digitalWrite(11,HIGH);
}
else
{
digitalWrite(11,LOW);
}
}
No comments:
Post a Comment