I am using the nrf Connect v1.9.1 SDK. I am currently trying to read the battery level for the CR2032 battery for the nrf52dk_nrf52832 build. There are two different approaches it seems to reading the battery level. One where you use the bas.h file and use function bt_bas_get_battery_level which is demonstrated in the peripheral_hr sample. The other method is used in the central_bas example, uses the bas_client.h file with a callback function. I currently have the former method in my code but it always seems to return 0x64/100 percent.
What differentiates these?
Which is more accurate?
Why would someone choose one over the other?
Why does the first method always give me 100 percent? I have purposely depleted the CR2032 battery to 2.2 V out of the 3 V.