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

Develop an interfacing circuit and a sketch to increment count on 7-Segment based on switch press. Count goes from 00 to 99.

Identify bugs and resolve it to fulfill following objective. Interface 3 LEDs and 4 SWICHES with Arduino. Develop a program that by pressing 1st switch it will ON LED1, by pressing 2nd switch it ON LED2 and same for 3rd switch and LED3. By pressing 4th switch it will reset (OFF) all LEDs.

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