From 2f13aa3f1ced802bd37722d9b00fff9908003e29 Mon Sep 17 00:00:00 2001 From: Daniel Eichhorn Date: Mon, 3 Jun 2019 08:53:34 +0200 Subject: [PATCH] Add basic support for 7.5" ePaper --- EspaperClient/EspaperClient.ino | 6 +++++ EspaperClient/artwork.h | 2 +- EspaperClient/configportal.h | 3 +++ EspaperClient/settings.h | 15 +++++++++++ platformio.ini | 48 +++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+), 1 deletion(-) diff --git a/EspaperClient/EspaperClient.ino b/EspaperClient/EspaperClient.ino index 8e76d86..3418629 100644 --- a/EspaperClient/EspaperClient.ino +++ b/EspaperClient/EspaperClient.ino @@ -32,6 +32,8 @@ #include #elif defined(EPD42) #include +#elif defined(EPD75) + #include #else #error Please define in settings.h for which device you want to compile: EPD29 or EPD42 #endif @@ -53,6 +55,10 @@ uint16_t palette[] = {MINI_BLACK, MINI_WHITE}; EPD_WaveShare42 epd(CS, RST, DC, BUSY); #define DEVICE_ROTATION 2 #endif +#ifdef EPD75 + EPD_WaveShare75 epd(CS, RST, DC, BUSY); + #define DEVICE_ROTATION 0 +#endif time_t startTime; int startMillis; diff --git a/EspaperClient/artwork.h b/EspaperClient/artwork.h index dbeca1d..47b0469 100644 --- a/EspaperClient/artwork.h +++ b/EspaperClient/artwork.h @@ -428,7 +428,7 @@ const char boot_screen[] PROGMEM = { 0xff, 0xff }; #endif -#if defined(EPD42) +#if defined(EPD42) || defined(EPD75) unsigned int boot_screen_len = 15006; const char boot_screen[] PROGMEM = { 0x01, 0x01, 0x01, 0x90, 0x01, 0x2c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, diff --git a/EspaperClient/configportal.h b/EspaperClient/configportal.h index 56be4ae..9cf3e48 100644 --- a/EspaperClient/configportal.h +++ b/EspaperClient/configportal.h @@ -453,6 +453,9 @@ void startConfigPortal(MiniGrafx *gfx) { #ifdef EPD42 uint8_t yPosition = 180; #endif + #ifdef EPD75 + uint8_t yPosition = 180; + #endif #ifdef COLOR_TFT_24 uint8_t yPosition = 120; #endif diff --git a/EspaperClient/settings.h b/EspaperClient/settings.h index 5998e72..8c96e94 100644 --- a/EspaperClient/settings.h +++ b/EspaperClient/settings.h @@ -57,6 +57,21 @@ #define USR_BTN 12 // D6 #define DEVICE_TYPE Espaper42Bw +#elif defined(ESPAPER75BW) + #define EPD75 + + #define CS 2 + #define RST 15 + #define DC 5 + #define BUSY 4 + #define USR_BTN 12 + #define IMU_SDA 21 + #define IMU_SCL 22 + #define WAKE_UP_PIN GPIO_NUM_27 + #define BUZZER_PIN GPIO_NUM_32 + #define LED_PIN 26 + + #define DEVICE_TYPE Espaper75Bw #elif defined(ESP_COLOR_KIT) #define COLOR_TFT_24 diff --git a/platformio.ini b/platformio.ini index 7d345a9..594d25f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,6 +24,9 @@ src_dir = EspaperClient ;env_default = TTGOT529Bw-PROD ;env_default = TTGOT529Bw-TEST ;env_default = TTGOT529Bw-DEV +;env_default = Espaper75Bw-PROD +env_default = Espaper75Bw-TEST +;env_default = Espaper75Bw-DEV ;env_default = ESPColorKit-TEST [common] @@ -232,3 +235,48 @@ upload_resetmethod = ${common.upload_resetmethod} upload_speed = ${common.upload_speed} extra_scripts = ${common.extra_scripts} lib_deps = ${common.lib_deps} + +[env:Espaper75Bw-PROD] +framework = arduino +board = esp-wrover-kit +platform = espressif32 +;board_build.flash_mode = ${common.board_build.flash_mode} +board_build.f_cpu = ${esp32.board_build.f_cpu} +;build_unflags = ${common.build_unflags} +build_flags = ${esp32.build_flags} -DESPAPER75BW +monitor_speed = ${common.monitor_speed} +upload_port = ${common.upload_port} +upload_resetmethod = ${common.upload_resetmethod} +upload_speed = ${common.upload_speed} +extra_scripts = ${common.extra_scripts} +lib_deps = ${common.lib_deps} + +[env:Espaper75Bw-TEST] +framework = arduino +board = esp-wrover-kit +platform = espressif32 +;board_build.flash_mode = ${common.board_build.flash_mode} +board_build.f_cpu = ${esp32.board_build.f_cpu} +;build_unflags = ${common.build_unflags} +build_flags = ${esp32.build_flags} -DESPAPER75BW -DTEST_ENV +monitor_speed = ${common.monitor_speed} +upload_port = ${common.upload_port} +upload_resetmethod = ${common.upload_resetmethod} +upload_speed = ${common.upload_speed} +extra_scripts = ${common.extra_scripts} +lib_deps = ${common.lib_deps} + +[env:Espaper75Bw-DEV] +framework = arduino +board = esp-wrover-kit +platform = espressif32 +;board_build.flash_mode = ${common.board_build.flash_mode} +board_build.f_cpu = ${esp32.board_build.f_cpu} +;build_unflags = ${common.build_unflags} +build_flags = ${esp32.build_flags} -DESPAPER75BW -DDEV_ENV +monitor_speed = ${common.monitor_speed} +upload_port = ${common.upload_port} +upload_resetmethod = ${common.upload_resetmethod} +upload_speed = ${common.upload_speed} +extra_scripts = ${common.extra_scripts} +lib_deps = ${common.lib_deps}