Changed the battery calculation algorithm and it is now the same value as the Ruuvi ios app.
I am having an issue calculating the battery voltage.
Receiving advertisements at -44 to -58 dBm
Brand new tag so I’m assuming it has the latest firmware.
Data format 5
Actual voltage measured with a meter on the battery = 3.20
Ruuvi ios app value: 3.139
3.139 = 110 00000011 h60E → 1539 + 1600
The battery values (13,14) are being read by a Nordic sniffer and my application.
The bytes are toggling between xC036 and xC136
The 5 RSSI bits calculate to +4 dbm
The 11 battery bits are toggling between h036 and h136. When added to the 1660 mv offset the calculated voltage is 1.72 to 1.91.
If I do a conversion test and hard code the pwr/battery bytes to hC60E the calculated voltage is 3.139
Anyone have any ideas on what I might be doing wrong.