|
PicoLowLevel
|
Class to measure battery level and status. More...
#include <Battery.h>
Public Member Functions | |
| Battery (byte pin=BAT_PIN, int r1=BAT_R1, int r2=BAT_R2) | |
| float | readVoltage () |
| Reads the current battery voltage. | |
| float | chargePercent () |
| Estimates the current battery charge. | |
| bool | charged () |
| Check the battery charge status. | |
| bool | USB () |
| Check if the Pico is being powered from the USB port. | |
Class to measure battery level and status.
| bool Battery::charged | ( | ) |
Check the battery charge status.


| float Battery::chargePercent | ( | ) |
Estimates the current battery charge.

| float Battery::readVoltage | ( | ) |
Reads the current battery voltage.

| bool Battery::USB | ( | ) |
Check if the Pico is being powered from the USB port.