This example shows you how to read the actual battery voltage on a MKRZero board. The value coming from
analogRead() 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
analogRead(ADC_BATTERY) into the corresponding voltage. The sketch below demonstrates how to do it.