tortuga DataLogging Library: battery, speed, time, average...
Fork of DataLogging by
Diff: BatteryState.h
- Revision:
- 4:f91f45d52f9b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BatteryState.h Fri Jul 15 12:48:06 2016 +0000 @@ -0,0 +1,22 @@ +#ifndef BATTERYSTATE_H +#define BATTERYSTATE_H +#include "mbed.h" + +class BatteryState{ + +public: + typedef enum batteryType { + Battery12V=0, + Battery48V + } batteryType; + + BatteryState(PinName pin, batteryType batType); + uint8_t getBatteryPercentage(); + + +protected: + AnalogIn batteryPin; + batteryType type; +}; + +#endif \ No newline at end of file