You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-19Lines changed: 32 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ Template-oriented driver for e-paper displays using Arduino. Define a layout wi
11
11
-[Setup](#setup)
12
12
-[Requirements](#requirements)
13
13
-[Quickstart](#quickstart)
14
+
-[Hardware Setup](#hardware-setup)
14
15
-[Deep Sleep](#deep-sleep)
15
-
-[SPI Bus and Pin Selection](#spi-bus-and-pin-selection)
16
16
-[Concepts](#concepts)
17
17
-[Variables](#variables)
18
18
-[Regions](#regions)
@@ -59,42 +59,55 @@ The [examples directory](./examples) has a few sample templates. Here are a few
59
59
60
60
## Quickstart
61
61
62
-
1. Connect display to MCU. (see [waveshare site](https://www.waveshare.com/wiki/1.54inch_e-Paper_Module) and **SPI Bus and Pin Selection**below for more information)
62
+
1. Connect display to MCU. See [Hardware Setup](#hardware-setup)below for more information.
63
63
1. Flash your MCU.
64
64
1. Use a pre-compiled binary from the [releases page](https://github.com/sidoh/epaper_templates/releases). **Make sure to select the file starting with `INITIALIZER_`**. You can use [esptool](https://github.com/espressif/esptool) or the [ESP32 flash tool](https://www.espressif.com/en/support/download/other-tools). Example command:
2. With PlatformIO: for example `pio run -e esp32 -t upload`. You will need to have [nodejs](https://nodejs.org/en/) installed in order to buidl the web assets.
69
69
2. Setup WiFi. A setup AP will appear named `epaper_XXXXXX`. The default password is **waveshare**.
70
-
3. Visit the Web UI to configure further.
70
+
3. Visit the Web UI to configure further. If you used custom pins, make sure to configure those.
71
71
72
-
## Deep Sleep
72
+
## Hardware Setup
73
73
74
-
e-paper templates can function in _deep sleep_ mode. When configured, the system will continuously:
74
+
Waveshare SPI modules have six total data pins that needs to be mapped onto your ESP32. There are **3x SPI pins** and **3x configurable non-SPI pins** you'll need to connect:
75
75
76
-
1. Wake from sleep
77
-
2. Check if a configurable GPIO pin is set. If it is, stays awake until next reboot
78
-
3. Otherwise, stay awake for a configurable period to receive updates and refresh the screen.
79
-
4. Put both the ESP32 and the e-paper display into deep sleep mode.
76
+
|Pin Name|Description|Default pin|
77
+
|-|-|-|
78
+
|DIN|SPI MOSI|GPIO 13 (HSPI MOSI)|
79
+
|CLK|SPI clock|GPIO 14 (HSPI CLK)|
80
+
|CS|SPI chip select|GPIO 15 (HSPI SS)
81
+
|DC|Data/Command control pin (configurable)|GPIO 17|
82
+
|RST|External reset|GPIO 16|
83
+
|BUSY|Busy state output pin|GPIO 7|
80
84
81
-
This is useful if trying to conserve power. Deep sleep mode can be configured in the "Power" tab within the web UI.
85
+
If you wish to use different data (non-SPI) pins, those are all configurable in the UI.
82
86
83
-
##SPI Bus and Pin Selection
87
+
#### Custom SPI bus
84
88
85
-
The ESP32 has 4 SPI busses, however, one is reserved for the chips Flash. (SPI0) and another is often used by PSRAM (SP1).
89
+
The ESP32 has two available SPI busses. The default is HSPI, but you can select VSPI in the settings page. Some driver boards like the [Waveshare ESP32 Driver](https://www.waveshare.com/wiki/E-Paper_ESP32_Driver_Board) use custom SPI pins.
86
90
87
91
In the **Hardware** tab of the settings page, you can select one of the two free SPI busses on the ESP32. (HSPI and VSPI)
88
92
89
-
| | VSPI | HSPI (default) |
90
-
|-----------|------|----------------|
91
-
| DI (MOSI) | 19 | 12 |
92
-
| CLK | 18 | 14 |
93
-
| CS (SS) | 5 | 15 |
93
+
| | VSPI | HSPI (default) | Waveshare Custom |
94
+
|-----------|------|----------------|-|
95
+
| DI (MOSI) | 19 | 12 |14|
96
+
| CLK | 18 | 14 |13|
97
+
| CS (SS) | 5 | 15 |15|
94
98
95
-
Additionally, the displays will require extra pins to be configured to work properly. These are also selectable in the **Hardware** tab.
99
+
Ensure that you do not select pins that conflict with the your SPI Bus/Deep Sleep configurations.
100
+
101
+
## Deep Sleep
96
102
97
-
Please ensure that you do not select pins that conflict with the your SPI Bus/Deep Sleep configurations.
103
+
e-paper templates can function in _deep sleep_ mode. When configured, the system will continuously:
104
+
105
+
1. Wake from sleep
106
+
2. Check if a configurable GPIO pin is set. If it is, stays awake until next reboot
107
+
3. Otherwise, stay awake for a configurable period to receive updates and refresh the screen.
108
+
4. Put both the ESP32 and the e-paper display into deep sleep mode.
109
+
110
+
This is useful if trying to conserve power. Deep sleep mode can be configured in the "Power" tab within the web UI.
0 commit comments