• I've got an MDBT42Q connected to a LiPo battery. Is there any way to calculate the percentage of the battery that's remaining? The build-in function only works for Puck, Pixl and Bangle.

    Can I do something similar to what they have?

    JsVarInt jswrap_puck_getBattery() {
      JsVarFloat v = jshReadVRef();
      int pc = (v-2.2)*100/0.6;
      if (pc>100) pc=100;
      if (pc<0) pc=0;
      return pc;
    }
    

    Thanks.

About

Avatar for user91203 @user91203 started