WatchyBattery.h using RTC to determine ADC PIN.
This commit is contained in:
parent
78f00651c0
commit
40eeab37b9
15
Battery/WatchyBattery.h
Normal file
15
Battery/WatchyBattery.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <WatchyRTC.h>
|
||||||
|
#ifndef WatchyBattery_H
|
||||||
|
#define WatchyBattery_H
|
||||||
|
|
||||||
|
class WatchyBatt {
|
||||||
|
public:
|
||||||
|
float Read(WatchyRTC RTC){
|
||||||
|
if (RTC.rtcType == DS3231)
|
||||||
|
return analogRead(33);
|
||||||
|
else if (RTC.rtcType == PCF8563)
|
||||||
|
return analogRead(35);
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Loading…
x
Reference in New Issue
Block a user