I’m trying to understand how I could use WaveShare EPaper Display with Adafruit HUZZAH32 ESP32 Feather Board.
With these connections
SDI/SCK -> MOSI
SCK/SCLK -> SCK
CS -> 15
DC -> 33
RST/Reset -> 27
Busy -> 32
and this code
#include <GxEPD.h>
#include <GxGDEP015OC1/GxGDEP015OC1.cpp> // 1.54" b/w
#include <GxIO/GxIO_SPI/GxIO_SPI.cpp>
#include <GxIO/GxIO.cpp>
#include <Fonts/FreeSansBold24pt7b.h>
GxIO_Class io(SPI, 15, 33, 27);
GxEPD_Class display(io, 27, 32);
const char* name = "FreeSansBold24pt7b";
const GFXfont* f = &FreeSansBold24pt7b;
void setup() {
randomSeed(analogRead(0));
Serial.begin(9600);
Serial.println("Starting...");
display.init(9600);
//display.setRotation(1);
display.fillScreen(GxEPD_BLACK);
display.setFont(f);
display.update();
delay(2000);
}
void loop() {
Serial.println("showing randon number...");
showRandomNumber();
delay(2000);
}
void showRandomNumber() {
String randomString = String(random(1, 60));
uint16_t box_x = 60;
uint16_t box_y = 60;
uint16_t box_w = 90;
uint16_t box_h = 100;
uint16_t cursor_y = box_y + 16;
display.setRotation(45);
display.setFont(f);
display.setTextColor(GxEPD_BLACK);
display.fillRect(box_x, box_y, box_w, box_h, GxEPD_WHITE);
display.setCursor(box_x, cursor_y+38);
display.print(randomString);
display.updateWindow(box_x, box_y, box_w, box_h, true);
}
but I don’t get any reaction from the display, do you see something wrong in the code or the connections?
thanks a lot for your help
References
https://github.com/dgarrett/BasicEPaperReader
https://github.com/juanpabloaj/esp32_waveshare/blob/master/01_update_window/01_update_window.ino