Here is the Demo, Display Library example for SPI e-paper panels for sale on SEEED Studio from Dalian Good Display and boards from Waveshare. Requires HW SPI and Adafruit_GFX.
Adapted from GxEPD2_U8G2_Fonts_Example.ino
Notes, edit the three files , compile , upload and GO!
// mapping of my Seeed Studio for Xiao Nrf52840 Sense (previous default SPI pins)
BUSY → 4, RST → 5, DC → 6, CS-> 8, CLK → 9, DIN → 11
#define GxEPD2_DRIVER_CLASS GxEPD2_420_GDEY042T81 // GDEY042T81 400x300, SSD1683 (no inking)
U8G2_FOR_ADAFRUIT_GFX u8g2Fonts;
GxEPD2_BW<GxEPD2_420_GDEY042T81,GxEPD2_420_GDEY042T81 ::HEIGHT> display(GxEPD2_420_GDEY042T81 (/CS=D8/ 7, /DC=D3/ 5, /RST=D4/ 4, /BUSY=D2/ 3));
Can’t wait to Use this with the IMU to display and power down while it still has an image on it… REALLY Cool , Like the Latest “Temp reading” Dynamically updated and Statically Displayed at the same time.
WOW… Menu’s can be displayed while it’s a SLEEEEP!
What about “Touch Screen Wake-UP?” NEXT!!!
Here is the Zip of the above demo code.
GxEPD2_U8G2_Fonts_Example.ino.zip (90.1 KB)
Using library GxEPD2 at version 1.5.3 in folder: D:\Arduino_projects\libraries\GxEPD2
Using library Adafruit GFX Library at version 1.11.9 in folder: D:\Arduino_projects\libraries\Adafruit_GFX_Library
Using library Adafruit BusIO at version 1.14.5 in folder: D:\Arduino_projects\libraries\Adafruit_BusIO
Using library Wire at version 1.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.1\libraries\Wire
Using library SPI at version 1.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.1\libraries\SPI
Using library U8g2_for_Adafruit_GFX at version 1.8.0 in folder: D:\Arduino_projects\libraries\U8g2_for_Adafruit_GFX
Using library Adafruit TinyUSB Library at version 1.7.0 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.1\libraries\Adafruit_TinyUSB_Arduino
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\9-2019q4/bin/arm-none-eabi-size" -A "C:\\Users\\Dude\\AppData\\Local\\Temp\\arduino\\sketches\\97F2F19BDF35949AB1C5D9C6B2C460F0/GxEPD2_U8G2_Fonts_Example.ino.elf"
Sketch uses 91280 bytes (11%) of program storage space. Maximum is 811008 bytes.
Global variables use 22836 bytes (9%) of dynamic memory, leaving 214732 bytes for local variables. Maximum is 237568 bytes.
Note E-paper requires the use of a frame buffer, in most cases. Microcontrollers with little RAM or SRAM won’t make the Lift. 15K buffer and 15K code, your out-a-space
All the M4 micros can do the job easy.
HTH
GL PJ
// Works with Nrf52840 AOK
// Wavshare and Good-Display
// Connect To Arduino
// e-Paper Xiao Nrf52840 Sense
// SIGNAL(color) NAME PIN PORT
// -------------------------------------------
// BUSY Purp D3 4 P0.29
// RST White D4 (SDA) 5 P0.05
// DC Green D5 (SCL) 6 P0.04
// CS Orange D7 (RXD) 8 P1.12
// CLK Yellow D8 (SCLK) 9 P1.13
// DIN BLUE D10 (MOSI) 11 P1.15
//
// GND BROWN GND 13
// VCC GRAY 3V3 12
HAVE fun!