top of page

How to make Motion sensor alert


Download Programming:

#include <SoftwareSerial.h>

//Alarm reciever's phone number with country code

const String PHONE = "Enter_Your_Phone";

#define rxPin 2 //GSM Module TX pin to Arduino 2

#define txPin 3 //GSM Module RX pin to Arduino 3

SoftwareSerial sim800(rxPin,txPin);

//the pin that the sensor is atteched to

int sensor = 11;

void setup() {

  pinMode(sensor, INPUT);



  Serial.println("SIM800L software serial initialize");




void loop(){




while(Serial.available()) {



  int val = digitalRead(sensor);

  if (val == HIGH) {

    //state = HIGH;

    Serial.println("Motion detected!");




    delay(20000); //20 sec delay



Demo Video:

78 views0 comments

Recent Posts

See All


bottom of page