Home
About Us
Achievement
Home
Raspberry-Pi Projects
_Raspberry Pi 4 Complete Guide
Arduino Project
_All Projects
Esp8266 Project
_All Projects
Esp32 Project
_Automation-with-feedback
Home Security System Using Arduino, Pir Sensor And GSM Sim900A
Just Do Electronics
April 17, 2020
Home Security System Using Arduino, Pir Sensor And GSM Sim900A
Circuit Diagram :-
Code :-
//Prateek //www.prateeks.in #include
SoftwareSerial SIM900(2, 3); String textForSMS; int pirsensor = 10; int buzzer = 9; int red = 7; int green = 8; void setup() { randomSeed(analogRead(0)); Serial.begin(9600); SIM900.begin(9600); // original 19200. while enter 9600 for sim900A Serial.println(" logging time completed!"); pinMode(pirsensor, INPUT); pinMode(buzzer, OUTPUT); pinMode(red, OUTPUT); pinMode(green, OUTPUT); digitalWrite(buzzer, LOW); digitalWrite(red, LOW); digitalWrite(green, LOW); delay(100); } void loop() { if ( digitalRead(pirsensor) == HIGH) // { textForSMS = "\Any Person in your Room Plz Check It "; digitalWrite(buzzer, HIGH); digitalWrite(red, HIGH); digitalWrite(green, LOW); sendSMS(textForSMS); Serial.println(textForSMS); Serial.println("message sent."); delay(8000); } if ( digitalRead(pirsensor) == LOW) // { digitalWrite(buzzer, LOW); digitalWrite(red, LOW); digitalWrite(green, HIGH); delay(1000); } } void sendSMS(String message) { SIM900.print("AT+CMGF=1\r"); // AT command to send SMS message delay(1000); SIM900.println("AT + CMGS = \"+918830584864\""); // recipient's mobile number, in international format delay(1000); SIM900.println(message); // message to send SIM900.println((char)26); // End AT command with a ^Z, ASCII code 26 delay(1000); SIM900.println(); // give module time to send SMS }
0 Comments
Newer
Older
Smart Trolley Using RFID And Arduino Nano
Arduino Based Countdown Timer
Arduino Gps And Gsm Based location Tracking System
Make Fingerprint Door Lock | Arduino Project
NRF Based Servo Motor Control
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
Home Automation using GSM Module
GSM Based motor control
Arduino Based Ventilator
Ultrasonic Sensor as a Counter with Arduino
YouTube
Like on Facebook
Follow on Twitter
Follow on Google+
Follow on Instagram
Subscribe on Youtube
Hi WelCome To My Website If you have a creative mind and want to learn Electronics even without studying it then FRIENDS this Website And Youtube Channel is for you, I am crazy creators who love making Electronics things. I have a bunch of more than 130 Tutorial Videos on My YouTube Channel and I upload a new Tutorial every Sunday.
Tags
Arduino Project
Esp32 Project
Esp8266 Project
0 Comments