From f10dd8998dfd9ac510ae2184dd2c20e1a278b0b4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 9 Mar 2020 00:26:43 -0400 Subject: [PATCH] ok --- Door_Chime/code/Door_Chime/Door_Chime.ino | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Door_Chime/code/Door_Chime/Door_Chime.ino b/Door_Chime/code/Door_Chime/Door_Chime.ino index 2385502..4dd731b 100644 --- a/Door_Chime/code/Door_Chime/Door_Chime.ino +++ b/Door_Chime/code/Door_Chime/Door_Chime.ino @@ -18,14 +18,14 @@ void setup() { } void loop() { - /*if(testFET){ - while(1){ + //test the fet + /* while(1){ digitalWrite(FET, HIGH); // turn the LED on (HIGH is the voltage level) delay(100); // wait for a second digitalWrite(FET, LOW); // turn the LED off by making the voltage LOW - delay(3000); // wait for a second - } - }*/ + delay(1000); // wait for a second + }*/ + /* OUTLINE */ //Read light switch, read magnet switch @@ -42,10 +42,10 @@ void loop() { if(SWLIGHTvar == 0){ if(SWREEDvar == 1){ - digitalWrite(FET, HIGH); // turn the LED on (HIGH is the voltage level) - delay(100); // wait for a second - digitalWrite(FET, LOW); // turn the LED off by making the voltage LOW - delay(10000); // wait for a second + digitalWrite(FET, 1); // turn on (HIGH is the voltage level) + delay(80); // wait + digitalWrite(FET, 0); // turn off by making the voltage LOW + delay(15000); // wait for 15 seconds } goto breakout; }