On the Argon, there's a 3 line function in this post that will do it:
On the Boron, Electron, and E Series, it's now built into Device OS 1.5.0 and later:
https://docs.particle.io/reference/device-os/firmware/boron/#powersource-
On the Argon, there's a 3 line function in this post that will do it:
On the Boron, Electron, and E Series, it's now built into Device OS 1.5.0 and later:
https://docs.particle.io/reference/device-os/firmware/boron/#powersource-