Electron data usage

The docs have a lot of great info, and I know there is a SLEEP and PUBLISH example planned, but what I see right now is:

Being "Sleepy" When your Electron is asleep you won't use pings and power consumption will be much lower! For now, hop over to the firmware reference and read about sleep. Examples coming soon!

If you use Deep Sleep, the Electron will power up again from reset and re-handshake with the server. This will consume anywhere from 3KB to 6KB more data than if you were to use a STOP mode Sleep that effectively halts the processor and keeps the cellular modem on and connected to the cellular network. See example below.

Also to note, deep mode sleep does not turn off the modem, only the processor. You have to call Cellular.off() prior to sleeping for the lowest power consumption, at the expense of more data consumed on your next boot.

Try changing your sleep line and loop like this:

void setup()
{
  Wire.begin();
  pinMode(D1, INPUT_PULLDOWN);
} //setup()

void loop() {
  get3231Date();
  yearint = year + 2000;
  sprintf(ds3231timeStr,"%s, %d/%02u/%02u - %02u:%02u:%02u",weekDay,yearint,
    month,thedate,hours,minutes,seconds);
  get3231Temp();
  sprintf(publishStr, "%.2f° %s  %.2f", temp3231, ds3231timeStr, fuel.getSoC());
  Particle.publish("electron1", publishStr,60,PRIVATE);
  delay(1000);

  System.sleep(D1, RISING, 30 * 60); // Halt processor right here for 30 mins

} //loop()

I'll report back with the official example when I have it...

2 Likes