int ledPin= 13;
int reedSwitch = 7;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop() {
int readValue = digitalRead(reedSwitch);
Serial.println(readValue);
if(readValue) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
delay(100);
}