Skip to content

Commit

Permalink
Add basic support for 7.5" ePaper
Browse files Browse the repository at this point in the history
  • Loading branch information
squix78 authored and marcelstoer committed Nov 1, 2019
1 parent 5bd1a6e commit 2f13aa3
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 1 deletion.
6 changes: 6 additions & 0 deletions EspaperClient/EspaperClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <EPD_WaveShare_29.h>
#elif defined(EPD42)
#include <EPD_WaveShare_42.h>
#elif defined(EPD75)
#include <EPD_WaveShare_75.h>
#else
#error Please define in settings.h for which device you want to compile: EPD29 or EPD42
#endif
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion EspaperClient/artwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions EspaperClient/configportal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions EspaperClient/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
48 changes: 48 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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}

0 comments on commit 2f13aa3

Please sign in to comment.