Hello,
I am testing a Waveshare ePaper 1.54'' module, black and white model, on a Wemo D1 mini.
The code compiles and runs (the debug messages print on the serial console), but nothing prints on the screen
Note that the ePaper screen works, because I tested it previously on a RPi Zero W, with success.
But it does not work on the Wemo.
Could you please advise?
I use the GxEPD library with the following settings:
#include <GxGDEP015OC1/GxGDEP015OC1.h>
...
GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); // arbitrary selection of D3(=0), D4(=2), selected for default of GxEPD_Class
GxEPD_Class display(io, /*RST=D4*/ 2, /*BUSY=D2*/ 4); // default selection of D4(=2), D2(=4)
I have connected the screen as follows:
- 3.3 V to 3.3V, GND to GND
- Screen's DIN to Wemo D7
- Screen's CLK to Wemo D5
- Screen's CS to Wemo D8
- Screen's DC to Wemo D3
- Screen's RST to Wemo D4
- Screen's BUSY to Wemo D2
My code is the following:
#include <GxEPD.h>
// select the display class to use, only one
#include <GxGDEP015OC1/GxGDEP015OC1.h> // 1.54" b/w
#include GxEPD_BitmapExamples
// FreeFonts from Adafruit_GFX
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMonoBold18pt7b.h>
#include <Fonts/FreeMonoBold24pt7b.h>
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>
GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); // arbitrary selection of D3(=0), D4(=2), selected for default of GxEPD_Class
GxEPD_Class display(io, /*RST=D4*/ 2, /*BUSY=D2*/ 4); // default selection of D4(=2), D2(=4)
void setup()
{
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println();
Serial.println("setup");
display.init();
display.setRotation(3);
Serial.println("setup done");
}
void loop()
{
Serial.println("loop()");
showFont("FreeMonoBold24pt7b", &FreeMonoBold24pt7b);
Serial.println("drawLine");
display.drawLine(0,60,264,60,GxEPD_BLACK);
display.drawLine(0,90,264,90,GxEPD_BLACK);
delay(10000);
}
void showFont(const char name[], const GFXfont* f)
{
Serial.println("showFont()");
display.fillScreen(GxEPD_WHITE);
display.setTextColor(GxEPD_BLACK);
display.setFont(f);
display.setCursor(0, 0);
display.println();
display.println(name);
display.println("Hello World!");
Serial.println("< out of showFont()");
}
Thanks!
Axelle