Skip to content

Instantly share code, notes, and snippets.

@elliotthilaire
Created December 8, 2017 17:22
Show Gist options
  • Save elliotthilaire/8d2c936a4a001d8f8ee8c84cf811ea88 to your computer and use it in GitHub Desktop.
Save elliotthilaire/8d2c936a4a001d8f8ee8c84cf811ea88 to your computer and use it in GitHub Desktop.
// 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