George Kartsonas
Published © GPL3+

Autonomous Fire Hazard System

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

BeginnerFull instructions provided1 hour955
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 Studio KY-026 Flame Detector Sensor
×1

Software apps and online services

Maker service
IFTTT Maker service
Particle Build Web IDE
Particle Build Web IDE

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

2 projects • 44 followers

Comments

Add projectSign up / Login