Everytime I disconnect the device and power it back it is not connecting to wifi. I have to do the flash thing all the time to get it connected. Any solutions?
It sounds like you might be on the edge of your useable wifi. It may be just taking a long time to establish a connection. Try changing the orientation of the core/photon. If vertical try horizontal or vice versa. The best way though to confirm your wifi strength by publishing it.
// This #include statement was automatically added by the Spark IDE.
#include "elapsedMillis/elapsedMillis.h"
int TTL = 60; // time to live
int SignalStrenght = -1;
elapsedMillis tmrUpdate; //declare global if you don't want it reset every time loop runs
unsigned long updateInterval = 4000;
void setup(){
tmrUpdate = 0;
}
void loop(){
if(tmrUpdate > updateInterval){
SignalStrenght = WiFi.RSSI(); // The number will be between -1 and
// -128. The less negative the number
// the better the connection strenght.
Spark.publish("WifiSignal", String(SignalStrenght), TTL, PRIVATE);
tmrUpdate = 0;
}
}
I have to do the flash thing all the time to get it connected. Any solutions?
What do you mean by this?
Is this a Spark Core or a Photon?
The problem is for Core. I think the problem is on me. I was connecting the battery out on the 3V3 instead of Vin. Now its sorted out!
Thanks all for your support!