George Kartsonas
Published

Autonomous Fire Hazard System

The time has come to automate our good old fire alarms and make them part of an interconnected world.

EasyFull instructions provided1 hour272
Autonomous Fire Hazard System

Things used in this project

Hardware components

Photon
Particle Photon
×1
Relay Shield for Particle Photon I²C 8-Channel SPDT 10-Amp
ControlEverything.com Relay Shield for Particle Photon I²C 8-Channel SPDT 10-Amp
×1
Seeed KY-026 Flame Detector Sensor
×1

Software apps and online services

Maker service
IFTTT Maker service
Particle Build

Story

Read more

Code

Autonomous Fire Hazard System Code

Arduino
int LED = 7; // Use the onboard LED
int LIGHTS = 6;
int isFlamePin = 0;  // This is our input pin
int isFlame = LOW;  // LOW MEANS NO FLAME

void setup() {
  pinMode(LED, OUTPUT);
  pinMode(LIGHTS, OUTPUT);
  pinMode(isFlamePin, INPUT);
}

void loop() {
  isFlame = digitalRead(isFlamePin);
  if (isFlame== LOW)
  {
     digitalWrite(LED, LOW);
     digitalWrite(LIGHTS, LOW);
  }
  else
  {
      digitalWrite(LED, HIGH);
      digitalWrite(LIGHTS, HIGH);
      Particle.publish("Fire", "House is on fire", PUBLIC);
  }
}

Credits

George Kartsonas

George Kartsonas

1 project • 5 followers
Contact

Comments

Add projectSign up / Login