This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reading battery information through adp536x PMIC in Thingy91

Hi Dev team,

I have been working on a Thingy91and I was trying to read out the battery voltage of the device. 

I was able to do that through the modem using the MODEM_INFO library.

However, I would like to know how could I get the battery information through the adp536x PMIC. 

I tried to search in the adp536x.c file for any relevant functions but could not find any.

Is there any specific function available to read the battery information through the PMIC ?

Regards,

Adeel.

Parents Reply
  • Hi Carl,

    I tried using your code and I added the extra functions of the adp536x that were present in your files to the existing library. 

    I copied the battery_monitor.c code into my code and tried to call the : battery_monitor_read(uint8_t *buf) function in my main but I got a value of 0.

    I think I am calling it in a wrong way. Could you let me know what is the right way to call this function in the main() part of my code (or) could you point me out as to how it was used before in the old asset tracker examples.

    Regards,

    Adeel.

Children
Related