Skip to content

Instantly share code, notes, and snippets.

@Miraculix200
Last active September 2, 2020 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Miraculix200/794e8dbdff5e4fde01a146a9388b2e38 to your computer and use it in GitHub Desktop.
Save Miraculix200/794e8dbdff5e4fde01a146a9388b2e38 to your computer and use it in GitHub Desktop.
// Circuit: https://easyeda.com/Miraculix200/soft-latch-power-switch-mcu
void setup()
{
pinMode(D5, OUTPUT);
digitalWrite(D5, LOW);
}
void loop()
{
if (millis() > 10000) digitalWrite(D5, HIGH); // switch off the power after 10 seconds
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment