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