#include <SoftwareSerial.h>
// constants won't change. They're used here to set pin numbers:
SoftwareSerial mySerial(5,6); // RX, TX
// variables will change:
int led = 3;
int bt = 2;

void setup()
{
mySerial.begin(9600);
  // initialize the pushbutton pin as an input:
pinMode(LED, OUTPUT);
 // initialize the LED pin as an output:
pinMode(BTN, INPUT);

}

void loop() 
{
  int a = analogRead(BTN);
  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  mySerial.println("BT value : ");
  mySerial.println(a);
  if (a >= 100)
  {
    // turn LED on:
    digitalWrite(LED,HIGH);
    delay(100);
    // turn LED off:
    digitalWrite(LED,LOW);
    delay(100);
  }
  else
  {
    // turn LED off:
    digitalWrite(LED,LOW);
  }
}
