STEMpedia
Published © CC BY

Smoke Detecting System Using Arduino

In this project, you will learn how to make a DIY smart smoke detector.

IntermediateFull instructions provided3 hours755
Smoke Detecting System Using Arduino

Things used in this project

Hardware components

evive IoT Kit
STEMpedia evive IoT Kit
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Custom parts and enclosures

.STL of sprayer

Schematics

Fritzing Diagram for Smoke Detector

Code

Arduino Code for Smoke Detector

Arduino
#include<evive.h>

#define gas_sensor_pin        A0
#define gas_sensor_threshould 230   // put your threshould here
#define motor_enable_pin      44
#define motor_gnd_pin         28
#define motor_control_pin     29


void setup() {
  // put your setup code here, to run once:

  Serial.begin(9600);

  pinMode(44,OUTPUT);
  pinMode(28,OUTPUT);
  pinMode(29,OUTPUT);
  pinMode(A0,OUTPUT);

  analogWrite(44,255);
  digitalWrite(28,LOW);
  digitalWrite(29,LOW);

}

void loop() {
  // put your main code here, to run repeatedly:

  if(analogRead(gas_sensor_pin) >gas_sensor_threshould)
  {
    digitalWrite(29,HIGH);
    delay(5000);
  }
  else
  {
    digitalWrite(29,LOW);
  }
  delay(30);

}

evive Library

C/C++
No preview (download only).

Credits

STEMpedia

STEMpedia

42 projects • 168 followers
STEMpedia blends theory with experiential learning by offering state-of-the-art technology, projects, tutorials, courses, and much more.

Comments