Created
December 8, 2017 17:22
-
-
Save elliotthilaire/8d2c936a4a001d8f8ee8c84cf811ea88 to your computer and use it in GitHub Desktop.
This file contains 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
// ATtiny85 Night Light | |
void setup() { | |
pinMode(1, OUTPUT); | |
pinMode(2, OUTPUT); | |
} | |
void loop() { | |
if (digitalRead(2) == HIGH) { | |
digitalWrite(1, HIGH); | |
delay(60 * 1000 * 5); | |
} | |
digitalWrite(1, LOW); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment