diff --git a/README.md b/README.md index 2a862a0..ccaa9da 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,8 @@ Visit [**https://watchy.sqfmi.com**](https://watchy.sqfmi.com) for documentation 2. Install this library (search for **Watchy** in the library manager), and any other dependencies when prompted 3. Check out the examples under ```Examples``` -> ```Watchy``` 4. Compile & Upload with these board settings: - * Board: "Watchy" + * Board: "ESP32 Dev Module" * Partition Scheme: "Huge App" - * Board Revision: "Watchy v2.0" (if purchased in 2022) * All Other Settings: leave to default You may also have to install the [CP2104 USB to Serial drivers](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers) if the port is not automatically detected. diff --git a/library.json b/library.json index c66d5e5..efe21cf 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Watchy", - "version": "1.4.0-dev", + "version": "1.4.1", "description": "Watchy - An Open Source E-Paper Watch by SQFMI", "authors": [ { diff --git a/library.properties b/library.properties index d6e9c59..5b2d87a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Watchy -version=1.4.0-dev +version=1.4.1 author=SQFMI maintainer=SQFMI sentence=Watchy - An Open Source E-Paper Watch by SQFMI diff --git a/src/Watchy.h b/src/Watchy.h index 4233b49..43fa9ae 100644 --- a/src/Watchy.h +++ b/src/Watchy.h @@ -1,20 +1,20 @@ #ifndef WATCHY_H #define WATCHY_H -#include "BLE.h" -#include "DSEG7_Classic_Bold_53.h" -#include "WatchyRTC.h" -#include "bma.h" -#include "config.h" #include -#include -#include -#include +#include #include #include -#include #include +#include +#include #include +#include +#include "DSEG7_Classic_Bold_53.h" +#include "WatchyRTC.h" +#include "BLE.h" +#include "bma.h" +#include "config.h" typedef struct weatherData { int8_t temperature; diff --git a/src/config.h b/src/config.h index 9c13d61..f5ff21f 100644 --- a/src/config.h +++ b/src/config.h @@ -1,8 +1,50 @@ #ifndef CONFIG_H #define CONFIG_H -// display -#define DISPLAY_WIDTH 200 +//pins +#define MENU_BTN_PIN 26 +#define BACK_BTN_PIN 25 +#define DOWN_BTN_PIN 4 +#define DISPLAY_CS 5 +#define DISPLAY_RES 9 +#define DISPLAY_DC 10 +#define DISPLAY_BUSY 19 +#define ACC_INT_1_PIN 14 +#define ACC_INT_2_PIN 12 +#define VIB_MOTOR_PIN 13 +#define RTC_INT_PIN 27 + + +#if !defined(ARDUINO_WATCHY_V10) && !defined(ARDUINO_WATCHY_V15) && !defined(ARDUINO_WATCHY_V20) + #warning Hardware revision is not defined at the project level. Using hard-coded value + #define ARDUINO_WATCHY_V20 +#endif + +#if defined (ARDUINO_WATCHY_V10) + #define UP_BTN_PIN 32 + #define BATT_ADC_PIN 33 + #define UP_BTN_MASK GPIO_SEL_32 + #define RTC_TYPE 1 //DS3231 +#elif defined (ARDUINO_WATCHY_V15) + #define UP_BTN_PIN 32 + #define BATT_ADC_PIN 35 + #define UP_BTN_MASK GPIO_SEL_32 + #define RTC_TYPE 2 //PCF8563 +#elif defined (ARDUINO_WATCHY_V20) + #define UP_BTN_PIN 35 + #define BATT_ADC_PIN 34 + #define UP_BTN_MASK GPIO_SEL_35 + #define RTC_TYPE 2 //PCF8563 +#endif + +#define MENU_BTN_MASK GPIO_SEL_26 +#define BACK_BTN_MASK GPIO_SEL_25 +#define DOWN_BTN_MASK GPIO_SEL_4 +#define ACC_INT_MASK GPIO_SEL_14 +#define BTN_PIN_MASK MENU_BTN_MASK|BACK_BTN_MASK|UP_BTN_MASK|DOWN_BTN_MASK + +//display +#define DISPLAY_WIDTH 200 #define DISPLAY_HEIGHT 200 // wifi #define WIFI_AP_TIMEOUT 60