Skip to content

Instantly share code, notes, and snippets.

@indraastra
Last active October 9, 2015 00:10
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 indraastra/ffad65f01529a361ec61 to your computer and use it in GitHub Desktop.
Save indraastra/ffad65f01529a361ec61 to your computer and use it in GitHub Desktop.
WiFi Status v2
SYSTEM_MODE(MANUAL);
SYSTEM_THREAD(ENABLED);
void setup() {
Serial.begin(9600);
delay(1000);
}
void loop() {
//WiFi.hasCredentials(); // Problem 1: never connects. Comment out to fix.
if (Particle.connected() == false) {
Serial.print(".");
Particle.connect();
} else {
WiFi.hasCredentials(); // Problem 2: dropped connections. Comment out to fix.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment