 /*
keyestudio Easy plug super kit 
Project 9
Reed Switch Module
http://www.keyestudio.com
*/
int ledPin = 9;                // choose the pin for the LED
int inputPin = 5;               // Connect Reed Switch Module to input pin D5
void setup() {
  pinMode(ledPin, OUTPUT);      // declare LED as output
  pinMode(inputPin, INPUT);     // declare Reed Switch Module as input
}
void loop(){
  int val = digitalRead(inputPin);  // read Reed Switch Module input value
  if (val == HIGH) {            // check if the input is HIGH
    digitalWrite(ledPin, LOW);  // turn LED OFF
  } else {
    digitalWrite(ledPin, HIGH); // turn LED ON
  }
}
//***********************************************************
