LoRa_APRS_Tracker/src/power_management.h
2021-03-05 15:01:07 +01:00

36 lines
574 B
C++

#ifndef POWER_MANAGEMENT_H_
#define POWER_MANAGEMENT_H_
#include <Arduino.h>
#include <axp20x.h>
class PowerManagement
{
public:
PowerManagement();
bool begin(TwoWire & port);
void activateLoRa();
void deactivateLoRa();
void activateGPS();
void deactivateGPS();
void activateOLED();
void decativateOLED();
void activateMeasurement();
void deactivateMeasurement();
double getBatteryVoltage();
double getBatteryChargeDischargeCurrent();
String getBatteryVoltageStr();
String getBatteryChargeDischargeCurrentStr();
private:
AXP20X_Class axp;
};
#endif