This example shows you how to read the actual battery voltage on a MKR Zero board. The value coming from
is converted into voltage, and printed out to the serial monitor of the Arduino Software (IDE).
On the MKRZero there is an analog pin called ADC_BATTERY for this purpose. You only simply have to convert the
into the corresponding voltage. The sketch below demonstrates how to do it.