Created
January 29, 2022 16:18
-
-
Save ljmf00/fa71e2db618dced5354a9ebdfdbde2e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define REL_PIN 12 | |
#define LED_PIN 13 | |
#define HOUR_MILIS (1000UL * 60 * 60) | |
#define ON_TIME_MILIS (1000UL * 60 * 20) | |
void setup() { | |
pinMode(REL_PIN, OUTPUT); | |
pinMode(LED_PIN, OUTPUT); | |
digitalWrite(LED_PIN, LOW); | |
} | |
void loop() { | |
digitalWrite(REL_PIN, LOW); | |
delay(ON_TIME_MILIS); | |
digitalWrite(REL_PIN, HIGH); | |
//delay(HOUR_MILIS - ON_TIME_MILIS); | |
delay(ON_TIME_MILIS); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment