E-Paper and ESP8266 library communication

Hello! I am working on an E-Paper that the board is ESP8266, I am using the ESP8266WIFi library, and want it to print Message with E-Paper. So, the problem is the that the WiFi is not connected and E-Paper shows nothing, hope you can reach me out.
The ESP8266 is NodeMCU
The E-apper is 1.54 inch, GDEH0154D67, 200x200

The esp8266 NodeMCU library:
The reference page : ESP8266: HTTP GET Requests - techtutorialsx
The board manager: Quick Start to Nodemcu (ESP8266) on Arduino IDE : 3 Steps (with Pictures) - Instructables

The E-Paper library: https://github.com/ZinggJM/GxEPD2/tree/master/examples

Reminder :
The E-Paper can print text and images itself on Mega Arduino, and ESP8266 can connect with server.
When use the these libraries, the ESP8266 keeps saying connection and E-Paper shows nothing as shown below.
I was wondering what is the problem here? My pin connection is wrong? Btw, I want to stick to this ESP8266 library.

Thank you !

The code as follows:

Program code:

#include <GxEPD2_BW.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#define ENABLE_GxEPD2_GFX 0

// mapping suggestion from Waveshare SPI e-Paper to generic ESP8266
// BUSY -> GPIO4, RST -> GPIO2, DC -> GPIO0, CS -> GPIO15, CLK -> GPIO14, DIN -> GPIO13, GND -> GND, 3.3V -> 3.3V  
GxEPD2_BW<GxEPD2_154_D67, MAX_HEIGHT(GxEPD2_154_D67)> display(GxEPD2_154_D67(/*CS=10*/ 16, /*DC=*/ 18, /*RST=*/ 17, /*BUSY=*/ 19)); // GDEH0154D67 200x200

#define GxEPD2_DRIVER_CLASS GxEPD2_154_D67 // GDEH0154D67 200x200
#define GxEPD2_BW_IS_GxEPD2_BW true
#define IS_GxEPD(c, x) (c##x)
#define IS_GxEPD2_BW(x) IS_GxEPD(GxEPD2_BW_IS_, x)
//#if defined (ESP8266)
#define MAX_DISPLAY_BUFFER_SIZE (81920ul-34000ul-34000ul) // ~34000 base use, WiFiClientSecure seems to need about 34k more to work
#if defined (ESP8266)
#include <ESP8266WiFi.h>
#define USE_BearSSL true

#include <WiFiClient.h>
#include <WiFiClientSecure.h>
//----------------------------------The ESP8266 NodeMCU setting------------------------------------------------ 
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

const char* ssid = "yourNetworkName";
const char* password = "yourNetworkPassword";

void setup () {
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
//-----------------------------The E-Paper printing Part------------------------------------------------
  do {
  // this part of code is executed multiple times, as many as needed, in case of full buffer it is executed once

    display.drawRect(75,75,50,50,GxEPD_BLACK); // A rectangle should be shown on E-Paper
  } while (display.nextPage());

//-----------------------------The ESP8266 NodeMCU setting----------------------------------------------
void loop() {
  if (WiFi.status() == WL_CONNECTED) { //Check WiFi connection status
    HTTPClient http;  //Declare an object of class HTTPClient
    http.begin("http://jsonplaceholder.typicode.com/users/1");  //Specify request destination
    int httpCode = http.GET();                                  //Send the request
    if (httpCode > 0) { //Check the returning code
      String payload = http.getString();   //Get the request response payload
      Serial.println(payload);             //Print the response payload
    http.end();   //Close connection
  delay(30000);    //Send a request every 30 seconds

Error Message:

Arduino: 1.8.13 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Executable segment sizes:

IROM   : 263576          - code in flash         (default or ICACHE_FLASH_ATTR) 

IRAM   : 27340   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...) 

DATA   : 1260  )         - initialized variables (global, static) in RAM/HEAP 

RODATA : 916   ) / 81920 - constants             (global, static) in RAM/HEAP 

BSS    : 26352 )         - zeroed variables      (global, static) in RAM/HEAP 

Sketch uses 293092 bytes (28%) of program storage space. Maximum is 1044464 bytes.

Global variables use 28528 bytes (34%) of dynamic memory, leaving 53392 bytes for local variables. Maximum is 81920 bytes.

esptool.py v2.8

Serial port COM6

Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):

  File "C:\Users\johnson\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/upload.py", line 65, in <module>


  File "C:/Users/johnson/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 2890, in main


  File "C:/Users/johnson/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 483, in connect

    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))

esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header


the selected serial port _

 does not exist or your board is not connected

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header


the selected serial port _

 does not exist or your board is not connected

You might start with trying to figure out the why the selected serial port is not doing the thing. If the serial port does not do the thing then the program does not get uploaded and the WiFi and epaper display will not do their thing.

An image of your set up would be great.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.