pxt-microbit-powerUtils

Power Utilities

pins=github:bsiever/microbit-pxt-powerUtils

This extension can be used to detect the source of power (battery vs. USB)

Micro:bit v2 only!!!

USB Power Supply

powerUtils.usbPower() : boolean

True if USB power is available. False otherwise (only battery power).

Power Consumption

powerUtils.powerConsumption() : number

Estimated instantaneous power consumption

Acknowledgements

Icon based on Font Awesome icon 0xF1E6 SVG.