The ability is there already in a couple of forms.
Run MKR1000 BATTERY LEVEL or STATUS through Google.
There is also THIS PAGE but its slightly out of date so you may want to double check the code as I think there is a bug in it.
There were a couple more places to grab a sketch but I don't seem to be able to find them anymore.
Also check the old MKR section too as I think it was brought up in there.
I'm struggling with the same issue - to read battery level.
I found this page for the MKRZero, the comment says it's for the MKR1000 as well.
However the ADC_BATTERY gives an error ( not declared in this scope).
I changed ADC_BATTERY to A0 and it gives readings way to low (around 1.50V - Battery voltage is 4.1), and changing values.
Not very much useful info on the web found so far. I wonder if it is possible anyhow to test battery voltage on a mkr1000
Hi, this is an error in the tutorial. While the MKRZero has an internal connection between the battery and and analog input, the MKR1000 has not. So the only way to do it right now is to bring the positive wire of the battery go into a voltage divider (the one on the MKRZero is good) and use one of the analog inputs (A0 - A6)