Created
October 31, 2016 15:36
-
-
Save dmiddlecamp/d32c02268bd7ffa30dfbfb94496b690f 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
SYSTEM_MODE(MANUAL); | |
unsigned int sleptAt; | |
bool once = true; | |
void setup() { | |
Particle.connect(); | |
delay(8000); | |
//System.sleep(30); | |
sleptAt = millis(); | |
WiFi.off(); | |
} | |
void loop() { | |
unsigned int now = millis(); | |
if (once && ((now - sleptAt) > 30000)) { | |
once = false; | |
WiFi.on(); | |
Particle.connect(); | |
} | |
delay(5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment