FLAME SESNOR WORKING

#CODE & CIRCUIT

int led = 4; //led for indication

int fs = 5;  //flame sensor

int mot =6;  //pump

void setup()

{

  pinMode(led, OUTPUT);   //Indicator

  pinMode(mot, OUTPUT);   //siren motor

  pinMode(fs, INPUT);     //flame sensor

}


void loop()

{

  int flame= digitalRead(fs);   // read date and store in flame variable

  if (flame== 1)       //condition

  {

    digitalWrite(mot, HIGH);

    digitalWrite(led, HIGH);

    delay(200);

    digitalWrite(led, LOW);

    delay(200);

  }

  else            //anywhere

  { 

    digitalWrite(mot, LOW);

    digitalWrite(led, LOW);

  }

  delay(1000);

}

Comments

Popular posts from this blog

How to make a LED flasher by using Transistor BC547 in Multisim || High-quality flasher

Three-phase full-wave controlled rectifier circuit with RLC Load on PSIM || Simulation of 3-phase