Board not going back online after sleep

I’m calling System.sleep(3800); on my photon code but the board never comes back online do I need re connect to the wifi once the board comes back from sleep?

How is it doing if you sleep for less than 63 minutes? Like 60 seconds?
What system version have you got on your device?
What does the RGB LED do?

1 Like

It does the same thing and the LED is white blinking

and I’m using the latest version

Why not just answer by stating the explicit version number?
Question remains: Are you using the latest pre-release version 0.8.0-rc.1 or do you mean the latest official release 0.6.3?

Sorry I was running out on home when I reply. I’m using the release 0.6.3

Now I know what to test with - but when I last tested it worked.
What code are you trying this with?


Update:
As expected this test code does what it’s meant to do

const int sec = 60;

void setup() {
}
void loop() {
  static int timeSleep = Time.now();
  static uint32_t wait = 0;
  
  if (Particle.connected() && millis() - wait > (sec+10)*1000) {
    wait = millis();
    Serial.println("Going to sleep");
    System.sleep(sec);
    timeSleep = Time.now();
  }
  Serial.printlnf("%3d: %sconnected", Time.now() - timeSleep, Particle.connected() ? " " : "dis");
  delay(1000);
}

Output:

...
 61:  connected
 62:  connected
 63:  connected
 64:  connected
 65:  connected
Going to sleep
  0: disconnected
  1: disconnected
  2: disconnected
  3: disconnected
  4: disconnected
  5: disconnected
...
 55: disconnected
 56: disconnected
 57: disconnected
 58: disconnected
 59: disconnected
 62: disconnected
 64:  connected
 65:  connected
 66:  connected
 68:  connected
...

The hickups between 59 and 64 are the reconnection hold-ups.

Here is the code I’m using

void setup() {
    Serial.begin(115200);
}

void loop() {
    ping(D0, 10000);
}

void ping(pin_t pwPin1, uint32_t wait) {
    uint32_t duration, inches, cm;
    
    static bool init = false;
    if (!init) {
        pinMode(pwPin1, INPUT);
        delay(50);
        init = true;
    }

    duration = pulseIn(pwPin1, HIGH);
    cm = duration / 58;
    
    Serial.printlnf("%6d cm / %6d us", cm, duration);
    
    delay(wait);
    System.sleep(60);
}