NB1500 IOT Cloud with Low Power Function

i would like to use NB1500 with NB Sim Card to send back measurement data from remote location to a cloud service (like Arduino IoT Cloud) at 4-5 hours intervals. As the location can only be assessed once every 3-4 months. I need to able to put the NB1500 in low power sleep mode.

I first implemented the "Standard Low Power Example" code in

https://docs.arduino.cc/learn/electronics/low-power/

it also worked perfectly (LED on for 1 second then off for 6 seconds).

I then used the following code on NB1500 which can upload data perfectly to Arduino IoT Cloud (Variable "count" keep increasing in Arduino Cloud Dashboard).

// MKRNB - Version: Latest 
#include <ArduinoLowPower.h>
/* 
  Sketch generated by the Arduino IoT Cloud Thing "Remote Sensor"
  https://create.arduino.cc/cloud/things/XXXXXX

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  int count1;

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  count1=count1+1;
  
  //LowPower.sleep(300000);
  
}



/*
  Since Count1 is READ_WRITE variable, onCount1Change() is
  executed every time a new value is received from IoT Cloud.
*/
void onCount1Change()  {
  // Add your code here to act upon Count1 change
}

but once i uncomment the line

LowPower.sleep(300000);

i implemented it via Arduino CLoud IDE. It never return any data on variable "count" in the dashboard.

i searched the internet and noted that Low Power/Deep Sleep may not supported by the Arduino IoT Cloud firmware stack.

Is it really true or is there any workaround? or i need to use other cloud service?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.