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
Ultrasonic Sensor Based Security System
Just Do Electronics
November 27, 2021
Circuit Diagram :-
Code :-
//Prateek //wwww.prateeks.in //https://www.youtube.com/c/JustDoElectronics/videos #include
const String PHONE = "+918830584864XX"; #define rxPin 2 #define txPin 3 SoftwareSerial sim800(rxPin, txPin); #define trigPin 6 #define echoPin 7 void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); Serial.begin(115200); sim800.begin(9600); Serial.println("SIM800L software serial initialize"); sim800.println("AT"); delay(1000); } void loop() { while (sim800.available()) { Serial.println(sim800.readString()); } while (Serial.available()) { sim800.println(Serial.readString()); } long time_duration, distance_in_cm; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); time_duration = pulseIn(echoPin, HIGH); distance_in_cm = time_duration / 29 / 2; Serial.print(distance_in_cm); Serial.println(" cm"); //if the distance is equal or less then 10 cm if (distance_in_cm <= 10) { Serial.println("Motion detected!"); Serial.println("calling...."); sim800.println("ATD" + PHONE + ";"); delay(20000); //20 sec delay } delay(500); }
GitHub :-
Code
Video :-
0 Comments
Newer
Older
ESP32 Interfacing With LDR Sensor
How to Make a Conveyor Belt System | Counter Machine
Smart Street Light Using Arduino
Esp32 Cam Based Face Unlock
IoT Based Patient Health Monitoring System Using Blynk App
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
ESP32 And Fingerprint Sensor Based Biometric Door Lock Security System
ESP32 Led Blink With Push Button
How To Make RFID & Keypad Based Door Lock
IoT Weight Scale using Load Cell HX711 & ESP8266
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