E-paper hm-et live
Jump to navigation
Jump to search
Pirkimo info:
- Pavadinimas: 2.13" 2.13 / 2.9" 2.9 Inch Epaper Module E-paper E-Ink EInk Display Screen SPI Support For Arduino UNO STM32 Raspberry PI ESP32
- AliExpress nuoroda
Kodas
/*
e-Paper Pin Function ESP32 Pin Example
212x104 pixels resolution
3 wire/4 wire (select 4 wire)
Some help from: https://github.com/blackcoffeexbt/ESP32-MH-ET-2.13-Demo-code
____________________
| e-paper | ESP32 |
| Busy | pin 4 |
| Reset | pin 21 |
| D/C | pin 22 |
| CS | pin 5 |
| SCLK | pin 18 |
| SDI | pin 23 |
| GND | gnd |
| VCC | 3.3 |
--------------------
*
* Install GxEPD Library https://github.com/ZinggJM/GxEPD2
* Install Adafruit-GFX https://github.com/adafruit/Adafruit-GFX-Library/tree/master
*
*/
#define CS 5
#define DC 22
#define RST 21
#define BUSY 4
#include <GxEPD2_BW.h>
#include <Fonts/FreeMonoBold9pt7b.h>
// Initialize the display with UC8151 controller
//GxEPD2_BW<GxEPD2_213_B72, GxEPD2_213_B72::HEIGHT> display(GxEPD2_213_B72(CS, DC, RST, BUSY)); // neveikia
//GxEPD2_BW<GxEPD2_213_B73, GxEPD2_213_B73::HEIGHT> display(GxEPD2_213_B73(CS, DC, RST, BUSY)); // veikia rodo teksta ant juodo fono
GxEPD2_BW<GxEPD2_213_B74, GxEPD2_213_B74::HEIGHT> display(GxEPD2_213_B74(CS, DC, RST, BUSY)); // veikia tinkamai ant balto fono
void setup() {
Serial.begin(115200);
delay(1000); // Allow time for serial monitor to initialize
Serial.println("Initializing e-Paper display...");
display.init();
display.setRotation(3);
display.setFont(&FreeMonoBold9pt7b);
display.setTextColor(GxEPD_BLACK);
const char HelloWorld[] = "Hello World!";
// full window mode is the initial mode, set it anyway
display.setFullWindow();
display.fillScreen(GxEPD_WHITE);
display.setCursor(0, 20);
display.print(HelloWorld);
display.display(false); // full update
delay(1000);
display.hibernate();
}
void loop() {};