Download and flash the attached microbit-battery-level.hex file to your micro:bit.


When the micro:bit is connected to a battery supply it will display the current supply from the battery (in volts) as a numerical value.


gif showing battery level scrolling across the display on the microbit


In the above animation, the reading is 3.11v, which is a typical output of two AAA batteries that have not had much use.