pranavmadhavaram
Published © GPL3+

Automatic fire extinguisher

Extinguishes fire automatically

IntermediateFull instructions provided1,417
Automatic fire extinguisher

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
RELAY
×1
dc water pump
×1

Story

Read more

Schematics

website_9_(2)_ZypKReoQBP.png

Code

Untitled file

Arduino
#include <Servo.h>
Servo myservo;
	

void setup() {
  // put your setup code here, to run once:
pinMode(8,INPUT);
myservo.attach(10);

pinMode(9,OUTPUT);



}

void loop() {
  // put your main code here, to run repeatedly:
if(digitalRead(8)==HIGH)
{myservo.write(0);
digitalWrite(9,HIGH);

}
else{
  myservo.write(360);
myservo.write(0);
digitalWrite(9,LOW);
}

}





 

Credits

pranavmadhavaram
16 projects • 1 follower

Comments