mirror of https://github.com/sqfmi/Watchy.git
parent
c6085ad483
commit
6363caeac2
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Watchy",
|
||||
"version": "1.2.8",
|
||||
"version": "1.2.9",
|
||||
"description": "Watchy - An Open Source E-Paper Watch by SQFMI",
|
||||
"authors": [
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name=Watchy
|
||||
version=1.2.8
|
||||
version=1.2.9
|
||||
author=SQFMI
|
||||
maintainer=SQFMI
|
||||
sentence=Watchy - An Open Source E-Paper Watch by SQFMI
|
||||
|
|
|
@ -581,8 +581,11 @@ weatherData Watchy::getWeatherData(){
|
|||
}
|
||||
|
||||
float Watchy::getBatteryVoltage(){
|
||||
// Battery voltage goes through a 1/2 divider.
|
||||
return analogReadMilliVolts(ADC_PIN) / 1000.0f * 2.0f;
|
||||
if(RTC.rtcType == DS3231){
|
||||
return analogReadMilliVolts(V10_ADC_PIN) / 1000.0f * 2.0f; // Battery voltage goes through a 1/2 divider.
|
||||
}else{
|
||||
return analogReadMilliVolts(V15_ADC_PIN) / 1000.0f * 2.0f;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t Watchy::_readRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len)
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
//pins
|
||||
#define SDA 21
|
||||
#define SCL 22
|
||||
//#define ADC_PIN 33
|
||||
#define ADC_PIN 35
|
||||
#define V10_ADC_PIN 33 //OG v1.0 Watchy
|
||||
#define V15_ADC_PIN 35 //v1.5 Watchy with PCF8563 RTC
|
||||
#define RTC_PIN GPIO_NUM_27
|
||||
#define CS 5
|
||||
#define DC 10
|
||||
|
|
Loading…
Reference in New Issue