# Probleme mit Waveshare 2.9inch ePaper Display

**URL:** <https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382>\
**Category:** Deutsch\
**Created:** [August 22, 2024, 5:42pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382 "2024-08-22T17:42:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bp158](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@bp158](https://forum.arduino.cc/u/bp158)\
**Post date:** [August 22, 2024, 5:42pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/1 "2024-08-22T17:42:54Z")

</div>

Moin.

Ich bin Neuling im Bereich der ESP-Familie und komme bei meinem gewünschten Usecase nicht weiter. Ich möchte mit einem D1mini (ESP8266-Basis) Daten von einer Webseite auf einem Waveshare 2.9inch ePaper (b/w) ausgeben.

Die Daten von der Webseite kann ich als JSON herunterladen, das klappt.

Bei der Ausgabe auf dem Display komme ich jedoch trotz verschiedener Beispiele aus dem Netz nicht weiter.

Als IDE nutze ich aktuell die Arduino IDE in Version 2.3.2.

## Mein aktueller Sketch sieht wie folgt aus:

```arduino
// mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini
// BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V

// include library, include base class, make path known
#include <GxEPD.h>

// select the display class to use, only one
//#include <GxGDEH029A1/GxGDEH029A1.h> // 2.9" b/w
#include <GxGDEW029T5/GxGDEW029T5.h> // 2.9" b/w UC8151 (IL0373)
//#include <GxGDEW029T5D/GxGDEW029T5D.h> // 2.9" b/w UC8151D
//#include <GxGDEM029T94/GxGDEM029T94.h> // 2.9" b/w
//#include <GxDEPG0290BS/GxDEPG0290BS.h> // 2.9" b/w Waveshare variant, TTGO T5 V2.4.1 2.9"

#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()
{
  Serial.begin(115200);
  delay(800);
  Serial.println();
  Serial.println("setup");

  display.init(115200); // enable diagnostic output on Serial

#if defined(__AVR) || false
  display.drawPaged(drawHelloWorld);
#elif (defined(_GxGDEW075Z09_H_) || defined(_GxGDEW075Z08_H_)) && (defined(ESP8266) || defined(ARDUINO_ARCH_STM32F1))
  display.drawPaged(drawHelloWorld);
#elif defined(_GxGDEW075Z09_H_)
  display.drawPaged(drawHelloWorld);
#else
  drawHelloWorld();
  display.update();
#endif
  display.powerDown();

  Serial.println("setup done");
}

void loop() {
  Serial.println("loop");
  delay(5000);
};

const char HelloWorld[] = "Hello World!";

void drawHelloWorld()
{
  Serial.println("drawHelloWorld");
  display.setRotation(1);
  display.setFont(&FreeMonoBold9pt7b);
  display.setTextColor(GxEPD_BLACK);
  int16_t tbx, tby; uint16_t tbw, tbh;
  display.getTextBounds(HelloWorld, 0, 0, &tbx, &tby, &tbw, &tbh);
  // center bounding box by transposition of origin:
  uint16_t x = ((display.width() - tbw) / 2) - tbx;
  uint16_t y = ((display.height() - tbh) / 2) - tby;
  display.fillScreen(GxEPD_WHITE);
  display.setCursor(x, y);
  display.print(HelloWorld);
  Serial.println("drawHelloWorld done");
}

void drawHelloWorldForDummies()
{
  // This example function/method can be used with full buffered graphics AND/OR paged drawing graphics
  // for paged drawing it is to be used as callback function
  // it will be executed once or multiple times, as many as needed,
  // in case of full buffer it can be called directly, or as callback
  // IMPORTANT: each iteration needs to draw the same, to avoid strange effects
  // use a copy of values that might change, don't read e.g. from analog or pins in the loop!
  //Serial.println("drawHelloWorldForDummies");
  const char text[] = "Hello World!";
  // most e-papers have width < height (portrait) as native orientation, especially the small ones
  // in GxEPD rotation 0 is used for native orientation (most TFT libraries use 0 fix for portrait orientation)
  // set rotation to 1 (rotate right 90 degrees) to have enough space on small displays (landscape)
  display.setRotation(1);
  // select a suitable font in Adafruit_GFX
  display.setFont(&FreeMonoBold9pt7b);
  // on e-papers black on white is more pleasant to read
  display.setTextColor(GxEPD_BLACK);
  // Adafruit_GFX has a handy method getTextBounds() to determine the boundary box for a text for the actual font
  int16_t tbx, tby; uint16_t tbw, tbh; // boundary box window
  display.getTextBounds(text, 0, 0, &tbx, &tby, &tbw, &tbh); // it works for origin 0, 0, fortunately (negative tby!)
  // center bounding box by transposition of origin:
  uint16_t x = ((display.width() - tbw) / 2) - tbx;
  uint16_t y = ((display.height() - tbh) / 2) - tby;
  display.fillScreen(GxEPD_WHITE); // set the background to white (fill the buffer with value for white)
  display.setCursor(x, y); // set the postition to start printing text
  display.print(text); // print some text
  //Serial.println("drawHelloWorldForDummies done");
}

```

* * *

Ob die Grafiklib die richtige ist, weiss ich leider nicht, ich habe alle probiert.

Entweder bekomme ich im seriellen Monitor Ausgaben ala

kcCn%!��a�b�%�!�eaA�maAk�kcCn%!�;�...  
�drawHelloWorld  
drawHelloWorld done  
\_wakeUp Power On : 9  
update : 1  
\_sleep Power Off : 1  
\_sleep Power Off : 1  
setup done  
loop

oder

;d$ܟ|�d�| �l� c|����s� .....  
�drawHelloWorld  
drawHelloWorld done  
Busy Timeout!  
command 0x1 : 10000265  
Busy Timeout!  
command 0xc : 10000127

aber keinerlei Ausgabe auf dem Display selbst.

Was mir auch aufgefallen ist, dass wenn das Display angeschlossen ist, ich keinen neuen Sketch auf den ESP hochladen kann. Sobald ich das Display vom D1mini trenne ist ein neuer Upload möglich.

Das ich leider nicht verifizieren kann, ob das Display (durch meine Versuche) einen Treffer hat, habe ich mir ein neues bestellt. Da ich dieses aber nicht auch gleich schrotten möchte, würde ich mich über Hilfe von Euch freuen. Wie ich in einigen Beiträgen gesehen habe, sind manche ja erfolgreich bei der Umsetzung gewesen (timschillert oder amithlon, als Beispiel ;-) ).

Vielen Dank!

---

<div class="post-metadata">

**Author:** ![Tommy56](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tommy56/32/232943_2.png) [@Tommy56](https://forum.arduino.cc/u/Tommy56)\
**Post date:** [August 22, 2024, 5:48pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/2 "2024-08-22T17:48:23Z")

</div>

> [@bp158](#):
>
> `Serial.begin(115200);`

Hast Du den seriellen Monitor auch auf 115200 Baud eingestellt?

Gruß Tommy

---

<div class="post-metadata">

**Author:** ![fony](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fony/32/936882_2.png) [@fony](https://forum.arduino.cc/u/fony)\
**Post date:** [August 22, 2024, 5:51pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/3 "2024-08-22T17:51:45Z")

</div>

Beispiele funktionieren?  
Den statt SS sollte zugehöriges GPIO eingetragen sein

```arduino
GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2);

```

Falls dir nicht bekannt SS ist CS Pin  
Erst mall die empfohlene Einstellung nutzen, wenn Display funktioniert kannst eigene probieren.

---

<div class="post-metadata">

**Author:** ![fony](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fony/32/936882_2.png) [@fony](https://forum.arduino.cc/u/fony)\
**Post date:** [August 22, 2024, 6:02pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/4 "2024-08-22T18:02:52Z")

</div>

Und natürlich kann sein das Waveshare arbeitet mit D Nummern nicht mit GPIO,  
Ist nur Vermutung da ich das Display nicht habe.

---

<div class="post-metadata">

**Author:** ![HotSystems](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hotsystems/32/219785_2.png) [@HotSystems](https://forum.arduino.cc/u/HotSystems)\
**Post date:** [August 22, 2024, 7:10pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/5 "2024-08-22T19:10:00Z")

</div>

> [@bp158](#):
>
> Was mir auch aufgefallen ist, dass wenn das Display angeschlossen ist, ich keinen neuen Sketch auf den ESP hochladen kann. Sobald ich das Display vom D1mini trenne ist ein neuer Upload möglich.

Das liegt vermutlich daran, da du den GPIO 0 und GPIO 2 in deinem Sketch verwendest. Beide Pins sind beim booten besonders zu beachten.

---

<div class="post-metadata">

**Author:** ![fony](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fony/32/936882_2.png) [@fony](https://forum.arduino.cc/u/fony)\
**Post date:** [August 22, 2024, 7:20pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/6 "2024-08-22T19:20:01Z")

</div>

Das habe vergessen, sehr lange nicht 8266 benutzt.  
Bei ESP32, so fern der nicht in Reboot Schleife fällt bei falscher GPIO nutzung, und alles funktioniert ist alles ok.  
Meine Vermutung liegt auf fehlender SS Deklaration, so wie am keinem Test mit Beispielen aus der Lib.  
Da der TO hat keine Lust auf Antworten, ist hier erst mall Ende.

---

<div class="post-metadata">

**Author:** ![HotSystems](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hotsystems/32/219785_2.png) [@HotSystems](https://forum.arduino.cc/u/HotSystems)\
**Post date:** [August 22, 2024, 7:33pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/7 "2024-08-22T19:33:03Z")

</div>

> [@fony](#):
>
> Das habe vergessen, sehr lange nicht 8266 benutzt.

Ich habe in meinem "SmartHome" hier 8 Stück im Einsatz und bin da ständig am optimieren. So muss ich das auch immer im Blick haben. 😉

Ob es tatsächlich daran liegt, k. A. nur eine Vermutung.

---

<div class="post-metadata">

**Author:** ![bp158](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@bp158](https://forum.arduino.cc/u/bp158)\
**Post date:** [August 23, 2024, 5:30am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/8 "2024-08-23T05:30:02Z")

</div>

Guten Morgen,

der Sketch ist der Beispielsketch "GxEPD\_HelloWorld". Das war ja auch mein Gedanke, erst Beispiele testen und auf diesen aufbauen, wenn sie funktionieren ...

@HotSystems  
Du schreibst, das Du 8 Stück im Einsatz hast. Wie ist Deine Verdrahtung und hast Du einen funktionierenden Beispielsketch ? Ich habe mittlerweile mind. 3 Verdrahtungsmöglichkeiten gesehen, wovon keine funktioniert hat...

@Tommy56  
Ja, die Baudrate im SeriellenMonitor ist auf die gleiche vom Sketch eingestellt.

Viele Grüße und schonmal einen schönen Freitag 🙂

---

<div class="post-metadata">

**Author:** ![fony](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fony/32/936882_2.png) [@fony](https://forum.arduino.cc/u/fony)\
**Post date:** [August 23, 2024, 5:44am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/9 "2024-08-23T05:44:31Z")

</div>

Noch mall, was ist mit SS ohne kann nicht funktionieren.

---

<div class="post-metadata">

**Author:** ![HotSystems](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hotsystems/32/219785_2.png) [@HotSystems](https://forum.arduino.cc/u/HotSystems)\
**Post date:** [August 23, 2024, 7:56am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/10 "2024-08-23T07:56:40Z")

</div>

> [@bp158](#):
>
> Du schreibst, das Du 8 Stück im Einsatz hast. Wie ist Deine Verdrahtung und hast Du einen funktionierenden Beispielsketch ?

Hallo,  
da gibt es keine Verdrahtung zwischen den ESP's. Das funktioniert alles über die in den Library-Beispielen vorgeschlagenen WLan-Verbindungen. Wegen WLan verwende ich ja die ESP8266 oder ESP32. Und von den ESP32 gibt es auch noch ein paar bei mir im Netz.

> [@bp158](#):
>
> Ich habe mittlerweile mind. 3 Verdrahtungsmöglichkeiten gesehen, wovon keine funktioniert hat...

Wenn du uns da keine Infos lieferst, haben wir auch keine Chance, da zu helfen.

---

<div class="post-metadata">

**Author:** ![fony](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fony/32/936882_2.png) [@fony](https://forum.arduino.cc/u/fony)\
**Post date:** [August 23, 2024, 8:38am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/11 "2024-08-23T08:38:23Z")

</div>

Der TO hat das so verstanden das es 8 Displays sind😊  
Und vor allem keine Antworten wegen dem SS,CS.

---

<div class="post-metadata">

**Author:** ![HotSystems](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hotsystems/32/219785_2.png) [@HotSystems](https://forum.arduino.cc/u/HotSystems)\
**Post date:** [August 23, 2024, 9:24am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/12 "2024-08-23T09:24:28Z")

</div>

> [@fony](#):
>
> Der TO hat das so verstanden das es 8 Displays sind

Ups...das hatte ich dann falsch verstanden. 😉

---

<div class="post-metadata">

**Author:** ![bp158](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@bp158](https://forum.arduino.cc/u/bp158)\
**Post date:** [August 23, 2024, 10:09am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/13 "2024-08-23T10:09:26Z")

</div>

Hallo zurück,

@HotSystems  
nein, ich hatte die Verdrahtung der Displays mit dem jeweiligen ESP8266 gemeint 😉  
die drei Möglichkeiten muss ich raussuchen, aktuell habe ich es wie in meinem Sketch dokumentiert umgesetzt. Die anderen beiden Varianten suche ich nochmal raus und gebe laut

@fony  
SS (was ja CS sein soll) liegt auf D8  
Falls ich Dich falsch verstanden haben sollte, kannst Du mich aufklären ?

---

<div class="post-metadata">

**Author:** ![HotSystems](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hotsystems/32/219785_2.png) [@HotSystems](https://forum.arduino.cc/u/HotSystems)\
**Post date:** [August 23, 2024, 10:12am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/14 "2024-08-23T10:12:12Z")

</div>

Ok, SPI ist eigentlich ein Standard, sollte also immer funktionieren.

Ob es beim "Waveshare" andere Möglichkeiten gibt, kann ich nicht sagen, da ich keins verwende. Und raten mag ich nicht.

> [@bp158](#):
>
> SS (was ja CS sein soll) liegt auf D8

Das kann man in deinem Sketch aber nicht finden, weil nicht angegeben.  
Und D8 kann missverständlich sein. Besser immer GPIO angeben.

---

<div class="post-metadata">

**Author:** ![fony](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fony/32/936882_2.png) [@fony](https://forum.arduino.cc/u/fony)\
**Post date:** [August 23, 2024, 10:48am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/15 "2024-08-23T10:48:56Z")

</div>

[quote="bp158, post:1, topic:1294382"]  
D1mini  
[/quote] dan mach doch statt

```arduino
GxIO_Class io(SPI, /*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2); 

```

```arduino
GxIO_Class io(SPI, /*CS=D8*/ 15, /*DC=D3*/ 0, /*RST=D4*/ 2); 

```

Das hier /_CS=D8_/ wird nicht berücksichtigt die Zeichen /\* \*/ bedeuten Kommentar und wird übersprungen bei kompilieren, eigentlich sollte eine Warnung geben

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/f/1/d/f1dd064b3f94f8927ddead90e6774b98cbbed816.png)

---

<div class="post-metadata">

**Author:** ![fony](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fony/32/936882_2.png) [@fony](https://forum.arduino.cc/u/fony)\
**Post date:** [August 23, 2024, 10:53am UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/16 "2024-08-23T10:53:14Z")

</div>

@bp158  
Was für Display ist das? Es gibt mehrere, link bitte, Foto wie der ist angeklemmt zeige auch, normaler Weise machen die Displays keine Probleme, so mansche darf man nicht die direkt löten ohne zwischen Adapter.  
Wen man I²C nicht braucht kann man die GPIO 5 und 4 nehmen.

---

<div class="post-metadata">

**Author:** ![bp158](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@bp158](https://forum.arduino.cc/u/bp158)\
**Post date:** [August 23, 2024, 12:42pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/17 "2024-08-23T12:42:33Z")

</div>

Hi,

anbei Fotos des aktuellen Aufbaus.

Die entsprechenden Anschlüsse des Display sind wie folgt belegt:  
BUSY -\> GPIO4 (D2)  
RST -\> GPIO2 (D4)  
DC -\> GPIO0 (D3)  
CS -\> GPIO15 (D8)  
CLK -\> GPIO14 (D5)  
DIN -\> GPIO13 (D7)  
GND -\> GND  
VCC -\> 3V3

 ![20240823_142136](https://europe1.discourse-cdn.com/arduino/original/4X/6/c/6/6c6f4c3a29c29635b4016bfa80c3ce5a2a617010.jpeg)  
 ![20240823_142210](https://europe1.discourse-cdn.com/arduino/original/4X/0/d/e/0de2cdcc930ff4a1b74dc0b859a34e02a2c935b3.jpeg)  
 ![20240823_142237](https://europe1.discourse-cdn.com/arduino/original/4X/d/3/5/d35035feb2c7560d2ab4281a193b5e76e2c4fae5.jpeg)

weitere Bilder komme im nächsten Beitrag (darf nur 3 anhängen ...)

---

<div class="post-metadata">

**Author:** ![bp158](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@bp158](https://forum.arduino.cc/u/bp158)\
**Post date:** [August 23, 2024, 12:43pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/18 "2024-08-23T12:43:22Z")

</div>

![20240823_142249](https://europe1.discourse-cdn.com/arduino/original/4X/1/6/9/1697a314d3138640f0faf093809bc5fa45cbe9d9.jpeg)  
 ![20240823_142300](https://europe1.discourse-cdn.com/arduino/original/4X/6/3/a/63a45a8b89274c3a6068b643bece1520c541cb83.jpeg)

---

<div class="post-metadata">

**Author:** ![HotSystems](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hotsystems/32/219785_2.png) [@HotSystems](https://forum.arduino.cc/u/HotSystems)\
**Post date:** [August 23, 2024, 2:31pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/19 "2024-08-23T14:31:36Z")

</div>

Wenn du die Pins auch so im Sketch eingestellt hast, sollte es doch funktionieren.  
Wobei ich GPIO0 und GPIO2 dabei mit Vorsicht genießen würde.  
Da kann man sich schnell ein Bein stellen.

---

<div class="post-metadata">

**Author:** ![fony](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/fony/32/936882_2.png) [@fony](https://forum.arduino.cc/u/fony)\
**Post date:** [August 23, 2024, 4:31pm UTC](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382/20 "2024-08-23T16:31:08Z")

</div>

@bp158 Danke, dann sind wir der Sache näher es ist ein 5V Display

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/f/e/8/fe84635ca6b0f8548bf691f8aaadb579d2b9f3f8.jpeg)  
Wenn ein UNO R3, Mega oder NANO R3 vorhanden auf dem den klemmen.  
Oder auf dem ESP den auf 5V Klemmen **aber** nur zum testen, bedeutet Sketch aufspielen, USB Kabel abklemmen VCC auf 5V drauf tun, USB anschließen, aber bitte nur kurz den, der ESP ist nicht 5 V tolerant.  
Mansche LDO (Spannungsregler) leiten die 3.3V nicht durch, so wie die Pegelwandler tuen sein dienst nicht, schalten nicht vernünftig.

[Next page](https://forum.arduino.cc/t/probleme-mit-waveshare-2-9inch-epaper-display/1294382.md?page=2)
