docs-content
docs-content copied to clipboard
Fix voltage calculation - Update mkr-battery-app-note.md
I was wondering why the calculated voltages in the example have not been correct. So I analysed it and found a wrong data type (max_Source_voltage).
What This PR Changes
- Fix data type of variable max_Source_voltage. Float is correct here to get correct values.
- Made calculation of the two voltages (voltADC and voltBat) better. No real change, but more accurate results this way. The order of the operations matter when you want to get accurate results.
Contribution Guidelines
- [x] I confirm that I have read the contribution guidelines and comply with them.