Difference between revisions of "Template:ESP32 Guides for SPI e-Paper"

From Waveshare Wiki
Jump to: navigation, search
(Created page with "==Hardware connection== ...")
 
Line 1: Line 1:
 +
==Setup Arduino IDE (Winodws)==
 +
To use the ESP32 board with Arduino IDE, you need to first add the support of the board package to the IDE. We use Windows PC as an example.<br />
 +
The ESP32 used here is the Waveshare [https://www.waveshare.com/e-paper-esp32-driver-board.htm ESP32 e-Paper Driver Board]<br />
 +
*Download the Arduino IDE from [https://www.arduino.cc/en/software/ Arduino website]
 +
*Install the Arduino-ESP32 Support Page:[https://codeload.github.com/espressif/arduino-esp32/zip/master Click to download]
 +
*Unzip the support package to the hardware/espressif/esp32 folder, which is under the installation directory of Arduino IDE. You may need to create them if you didn't find the directory on your PC.
 +
:[[File:Epd esp32 env 1.png|500px]]
 +
*Enter the tools folder, run the get.exe file as administrator.
 +
*After installing, restart the Arduino IDE, and you can find the ESP DEV Module options in the Tools-Boards menu of IDE
 +
==Download Demo Codes==
 +
*Download the ESP32 Demo codes [https://www.waveshare.com/w/upload/5/50/E-Paper_ESP32_Driver_Board_Code.7z e-Paper ESP32 Driver Codes] to your PC.
 +
*Unzip the demo codes
 +
: The demo codes are included in the examples folder.
 +
:[[File:Epd esp32 download 1.png|500px]]
 +
*You should copy the esp32-waveshare-epd folder to the \hardware\espressif\esp32\libraries folder which is under the installation directory of IDE. The esp32-waveshare-epd is saved under the examples directory.
 +
*[[File:Epd esp32 example 1.png|500px]]
 
==Hardware connection==
 
==Hardware connection==
...
+
*Raw panel + ESP32 Driver Board
 +
: If you have the ESP32 e-Paper Driver board as well as an e-Paper raw panel.You can just connect the e-paper panel to the ESP32 board as below:
 +
:[[File:Epd esp32 hard 1.png|400px]] [[File:Epd esp32 hard 2.png|400px]]
 +
: Configure the switch according to the type of display
 +
:[[File:Epd esp32 hard 3.png|400px]]
 +
{|class="wikitable"
 +
!Trigger state!!e-Paper
 +
|-
 +
|A||1.54inch e-Paper, 2.13inch e-Paper, 2.13inch e-Paper (D), 2.9inch e-Paper
 +
|-
 +
|B||1.54inch e-Paper (B), 1.54inch e-Paper (C)
 +
2.13inch e-Paper (B), 2.13inch e-Paper (C)<br/>
 +
2.7inch e-Paper (B)<br />
 +
2.9inch e-Paper (C), 2.9inch e-Paper (B)<br />
 +
4.2inch e-Paper (B), 4.2inch e-Paper (C)<br >
 +
5.83inch e-Paper (B), 5.83inch e-Paper (C) <br />
 +
7.5inch e-Paper (B), 7.5inch e-Paper (C), 7.5inch HD e-Paper, 7.5inch HD e-Paper (B)<br />
 +
|}
 +
'''Note: The ACeP e-Paper doesn't support this connecting method.'''
 +
*e-Paper Module/HAT + ESP32 Board
 +
: If you have the ESP32 Board as well as the e-Paper module/HAT which has PCB already, you can wire the displays by 8-pin cable pin
 +
{|border=1; style="width:700px;" align="center"
 +
|+ Connect to ESP32 Driver Board
 +
|-style="background:#2D6FDF; color:white;" align="center"
 +
|e-Paper||ESP32
 +
|-align="center"
 +
|Vcc||3.3V
 +
|-align="center"
 +
|GND||GND
 +
|-align="center"
 +
|DIN||GPIO14
 +
|-align="center"
 +
|CLK||GPIO13
 +
|-align="center"
 +
|CS||GPIO15
 +
|-align="center"
 +
|DC||GPIO27
 +
|-align="center"
 +
|RST||GPIO26
 +
|-align="center"
 +
|BUSY||GPIO25
 +
|}
 +
==Run the Demo Codes==
 +
*Open the Arduino IDE
 +
*Choose File->Examples-> waveshae-e-Paper -> And the project according to the type of display
 +
:[[File:Epd esp32 example 2.png|700px]]
 +
*Build and program the ESP32 board
 +
*Open the serial monitor, you can check the degbug information when runing the demo codes

Revision as of 09:20, 7 February 2021

Setup Arduino IDE (Winodws)

To use the ESP32 board with Arduino IDE, you need to first add the support of the board package to the IDE. We use Windows PC as an example.
The ESP32 used here is the Waveshare ESP32 e-Paper Driver Board

  • Download the Arduino IDE from Arduino website
  • Install the Arduino-ESP32 Support Page:Click to download
  • Unzip the support package to the hardware/espressif/esp32 folder, which is under the installation directory of Arduino IDE. You may need to create them if you didn't find the directory on your PC.
Epd esp32 env 1.png
  • Enter the tools folder, run the get.exe file as administrator.
  • After installing, restart the Arduino IDE, and you can find the ESP DEV Module options in the Tools-Boards menu of IDE

Download Demo Codes

The demo codes are included in the examples folder.
Epd esp32 download 1.png
  • You should copy the esp32-waveshare-epd folder to the \hardware\espressif\esp32\libraries folder which is under the installation directory of IDE. The esp32-waveshare-epd is saved under the examples directory.
  • Epd esp32 example 1.png

Hardware connection

  • Raw panel + ESP32 Driver Board
If you have the ESP32 e-Paper Driver board as well as an e-Paper raw panel.You can just connect the e-paper panel to the ESP32 board as below:
Epd esp32 hard 1.png Epd esp32 hard 2.png
Configure the switch according to the type of display
Epd esp32 hard 3.png
Trigger state e-Paper
A 1.54inch e-Paper, 2.13inch e-Paper, 2.13inch e-Paper (D), 2.9inch e-Paper
B 1.54inch e-Paper (B), 1.54inch e-Paper (C)

2.13inch e-Paper (B), 2.13inch e-Paper (C)
2.7inch e-Paper (B)
2.9inch e-Paper (C), 2.9inch e-Paper (B)
4.2inch e-Paper (B), 4.2inch e-Paper (C)
5.83inch e-Paper (B), 5.83inch e-Paper (C)
7.5inch e-Paper (B), 7.5inch e-Paper (C), 7.5inch HD e-Paper, 7.5inch HD e-Paper (B)

Note: The ACeP e-Paper doesn't support this connecting method.

  • e-Paper Module/HAT + ESP32 Board
If you have the ESP32 Board as well as the e-Paper module/HAT which has PCB already, you can wire the displays by 8-pin cable pin
Connect to ESP32 Driver Board
e-Paper ESP32
Vcc 3.3V
GND GND
DIN GPIO14
CLK GPIO13
CS GPIO15
DC GPIO27
RST GPIO26
BUSY GPIO25

Run the Demo Codes

  • Open the Arduino IDE
  • Choose File->Examples-> waveshae-e-Paper -> And the project according to the type of display
Epd esp32 example 2.png
  • Build and program the ESP32 board
  • Open the serial monitor, you can check the degbug information when runing the demo codes