#include <Arduino.h>
//#include <SoftwareSerial.h>
//SoftwareSerial SIM900(7,8); //Rx,tx trasmitter and receiver pin 
///String textMessage; // Variable to store text message

void (* resetSoftware)(void) = 0;
int reset= 6; // software reset initialization 

const int buttonPin = 2;     // Contact pin for the PIR sensor alarm 
const int ledPin =  12;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() 

{
// initialize the LED pin as an output:

pinMode (reset, OUTPUT);
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);


//Initializing sotware reset pin 6 for while loop operation 


   digitalWrite(reset,HIGH);
   delay (1000);
   digitalWrite (reset,LOW);
   delay (1000);
   digitalWrite (reset,HIGH);
   delay(1000);
   digitalWrite (reset,LOW);
   delay (1000);

}
void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(ledPin, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin, LOW);
  }
  resetSoftware ();
}