The overall purpose of this project is to make a fire alarm system using microcontrollers like Arduino. The whole coding for the software part was done in Arduino CC software, which codes with Java and C++ in general.
You can have a look at parts of my code for our project (Warning!!! Do not use this code without permission from me. Mail me at inilock@gmail.com asking for permission before using this code). The video demo for the project is also attached herewith:
#include<LiquidCrystal_I2C.h>
#include<Wire.h>
LiquidCrystal_I2C lcd(0x27,16,2);
const int buzzerPin1 = 6;
const int buzzerPin2 = 5;
const int flamePin = 9;
int Flame = HIGH;
int redled1 = 10;
int redled2= 11;
int greenled1 = 8;
int greenled2= 3;
void setup()
{
Wire.begin();
lcd.begin(16,2);
lcd.backlight();
pinMode(buzzerPin1, OUTPUT);
pinMode(buzzerPin2, OUTPUT);
pinMode(redled1, OUTPUT);
pinMode(redled2, OUTPUT);
pinMode(greenled1, OUTPUT);
pinMode(greenled2, OUTPUT);
pinMode(flamePin, INPUT);
Serial.begin(9600);
}
void loop()
{
Flame = digitalRead(flamePin);
ππDownload the full code from below button link: ππ
Connection Diagram:
Figure-1: Fire Alarm System on breadboard
Figure-2: Fire Alarm System (Schematic)
Project Demo Video: