RAK 5010 General Questions

A couple general questions:

Is there a way to tell how much longer my battery will last depending on the voltage? I see that
RUI_RETURN_STATUS rui_device_get_battery_level(float *voltage); returns the voltage, but is there a way to map voltage to hours or minutes of battery life left?

I want to send data via a POST request to a url. I have most of the AT commands working, but I am wondering which functions I should use to send that data. I see:

void at_parse(char *cmd) //Im guessing that I would just send my commands here?

or

RUI_RETURN_STATUS rui_cellular_send(uint8_t *data);
and
RUI_RETURN_STATUS rui_cellular_response(uint8_t *response, uint32_t len, uint32_t timeout);

Any help would be appreciated as I am still learning :slightly_smiling_face:

Hi @whyriod ,

Determining the energy left stored on the battery via voltage level will not give you accurate result because there is no general direct correlation between the battery voltage and the energy left. But you can use it as an indicator when it is already full or low.

If you want to use voltage level with acceptable accuracy, you can probably get samples and test the correlation of between the voltage level and the capacity. Then have a look up table for it. I haven’t done it myself but if the current drawn from the battery is almost consistent and not changing so much then that approach could work.

PS You need to use a coulomb counter to have a better way in checking the energy left in the battery.