|
@ -18,14 +18,14 @@ void setup() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void loop() { |
|
|
void loop() { |
|
|
/*if(testFET){
|
|
|
|
|
|
while(1){ |
|
|
|
|
|
|
|
|
//test the fet
|
|
|
|
|
|
/* while(1){
|
|
|
digitalWrite(FET, HIGH); // turn the LED on (HIGH is the voltage level)
|
|
|
digitalWrite(FET, HIGH); // turn the LED on (HIGH is the voltage level)
|
|
|
delay(100); // wait for a second
|
|
|
delay(100); // wait for a second
|
|
|
digitalWrite(FET, LOW); // turn the LED off by making the voltage LOW
|
|
|
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 */ |
|
|
/* OUTLINE */ |
|
|
//Read light switch, read magnet switch
|
|
|
//Read light switch, read magnet switch
|
|
@ -42,10 +42,10 @@ void loop() { |
|
|
|
|
|
|
|
|
if(SWLIGHTvar == 0){ |
|
|
if(SWLIGHTvar == 0){ |
|
|
if(SWREEDvar == 1){ |
|
|
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; |
|
|
goto breakout; |
|
|
} |
|
|
} |
|
|