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

nRF8001 Battery Monitor Example

It seems daft, but the ble_heart_rate_template_with_battery_service example in the nRF8001 Arduino SDK does not use the nRF8001's Battery Monitor!!

Instead, it just uses the Arduino analog functions. This seems pointless: surely the purpose of the examples in the nRF8001 SDK should be to show the use of the nRF8001's features?! There's no shortage of examples on the interwebs showing the use of the Arduino analog functions!

So - is there an example of using the nRF8001 Battery Monitor??

An "nRF Temp" example is mentioned here: devzone.nordicsemi.com/.../ - but that is not in the Arduino SDK (which is now, effetively, the only available/supported SDK).

Parents
  • Unfortunately I don't think there is an example in ble-sdk-arduino that shows how to get the battery level. However it is pretty straight forward. Just call lib_aci_get_battery_level() and after some time you will get a command response containing the battery level. From the data sheet: Response data: Supply voltage level (2 bytes, LSB/MSB). Analog voltage is calculated by multiplying the binary number by 3.52 mV.

Reply
  • Unfortunately I don't think there is an example in ble-sdk-arduino that shows how to get the battery level. However it is pretty straight forward. Just call lib_aci_get_battery_level() and after some time you will get a command response containing the battery level. From the data sheet: Response data: Supply voltage level (2 bytes, LSB/MSB). Analog voltage is calculated by multiplying the binary number by 3.52 mV.

Children
Related