Monday, 13 April 2020

Home Security System Based on Smoke, Fire, Pir and Door Sensor's Alert Using MSP430G2553 LANCHPAD

Home Security System Based on Smoke, Fire, Pir and Door Sensor's Alert Using MSP430G2553 LANCHPAD

PROJECT VIDEO LINK:

PROJECT BLOCK DIAGRAM:

SOFTWARE COMPILER LINK:
https://energia.nu/download/


SAMPLE SOFTWARE CODE:
----------------------
#include <LiquidCrystal.h>
LiquidCrystal lcd(P2_0, P2_1, P2_2, P2_3, P2_4, P2_5);

const int door=P1_2;
int dooralert=1;
int buzz=P1_6;

void setup() 
{
lcd.begin(16, 2);
pinMode(buzz, OUTPUT); 
pinMode(door, INPUT);
digitalWrite(buzz,LOW);
lcd.clear();
lcd.setCursor(0, 0);lcd.print("Home Security");
lcd.setCursor(0, 1);lcd.print("System Based on");
delay(3000);lcd.clear();

lcd.clear();
lcd.setCursor(0, 0);lcd.print("Alert Using ");
lcd.setCursor(0, 1);lcd.print("MSP430G2553 ");
delay(3000);lcd.clear(); 
}


void loop()
{
dooralert = digitalRead(door);
if (dooralert == LOW){lcd.setCursor(0,1);lcd.print("DOOR OK   ");delay (100);digitalWrite(buzz,LOW);delay(1000);}
else{lcd.clear() ;lcd.setCursor(0,0);lcd.print("DOOR ALERT  ");delay(1000);digitalWrite(buzz,HIGH);}

}

No comments:

Post a comment