Develop an interfacing circuit and a sketch for intruder alert system that uses PIR sensor and GSM modem. Upon intruder detection send SMS – “Alert : Intruder detected”. Repeat the same at 10 second interval till a reset button is pressed.

Here i am using online IDE Tinkercad . If you don't know what is tinkercad then refer my blog HERE or else you can use offline IDE also.

Code:-

void setup() {

  pinMode(2, INPUT); //Pin 2 as INPUT

  pinMode(3, OUTPUT); //PIN 3 as OUTPUT

}

 

void loop() {

  if (digitalRead(2) == HIGH)

  {

  digitalWrite(3, HIGH);   // turn the LED/Buzz ON

  delay(100);                       // wait for 100 msecond

  digitalWrite(3, LOW);   // turn the LED/Buzz OFF

  delay(100);                       // wait for 100 msecond

  }

}


Output:-



Comments

Popular Posts

3 Develop an interfacing circuit and a sketch to display decimal data on 7-Segments. The 3- digit number is sent over serial communication.

Interface 4 push button with arduino & do following: ** SW1 : when press, display 0 to 9 on LCD ** SW2 : when press, display 00 to 99 on LCD ** SW3 : when press, display 000 to 999 on LCD ** SW4 : when press, display 0000 to 9999 on LCD

Interface seven segment LED display with Arduino. Write a program display first ODD numbers and then EVEN numbers on seven segment with delay of 1 second (the numbers are in between 0 to 9).