pins=github:bsiever/microbit-pxt-powerUtils
This extension can be used to detect the source of power (battery vs. USB)
Micro:bit v2 only!!!
powerUtils.usbPower() : boolean
True if USB power is available. False otherwise (only battery power).
powerUtils.powerConsumption() : number
Estimated instantaneous power consumption
Icon based on Font Awesome icon 0xF1E6 SVG.