MKR 1400 Battery Or Charging Mode - Low Power

Hi,

I have this on my code:

   if (PMIC.chargeStatus() > 0) {
        
        SendChargeNotification(PMIC.chargeStatus()); //satus: 32 - in charge...

        //disable everything
        DisableGsmModule();
        GPS.standby();
        
        while (PMIC.chargeStatus() != 0) {
        //charging......
        LowPower.sleep(1000);  
        };
 
        //not charging......
        if (PMIC.chargeStatus() == 0) {
          SendChargeNotification(PMIC.chargeStatus());
        }
      }

So, PMIC change from 32 while device is in charging and change to 0 if run in battery..

How I can save the max energy while in charge mode ?

DeepSleep stop everithing.. sleep(1000) to check the value is the best option ?

I need a solution to replace this:

    while (PMIC.chargeStatus() != 0) {
        //charging......
        LowPower.sleep(1000);  
        };

And save the max energy monitoring only the PMIC Change Status() from PMIC lib.

Thanks

Your topic posted here that simply contained a link to the original location of this one has been deleted and this one has been moved here

It's necessary one topic common to all MKR devices ...

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