#include <GxEPD.h>
#include <GxGDEM029T94/GxGDEM029T94.h>
//#include <GxGDEM0213B74/GxGDEM0213B74.h> // 2.13" b/w 128x250 SSD1680
/*******************************************************************
//#include <GxGDEH0213B72/GxGDEH0213B72.h> // 2.13" b/w new panel
//#include <GxGDEH0213B73/GxGDEH0213B73.h> // 2.13" b/w newer panel
//#include <GxGDEM0213B74/GxGDEM0213B74.h> // 2.13" b/w 128x250 SSD1680
//#include <GxGDEW0213Z16/GxGDEW0213Z16.h> // 2.13" b/w/r
//#include <GxGDEH0213Z19/GxGDEH0213Z19.h> // 2.13" b/w/r UC8151D
//#include <GxGDEW0213T5D/GxGDEW0213T5D.h> // 2.13" b/w 104x212 UC8151D
//#include <GxDEPG0213BN/GxDEPG0213BN.h> // 2.13" b/w 128x250, SSD1680, TTGO T5 V2.4.1, V2.3.1
//#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 <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
//#include <GxGDEH029Z13/GxGDEH029Z13.h> // 2.9" b/w/r UC8151D
//#include <GxGDEW026T0/GxGDEW026T0.h> // 2.6" b/w
//#include <GxDEPG0266BN/GxDEPG0266BN.h> // 2.66" b/w 152x296, SSD1680, TTGO T5 V2.66, TTGO T5 V2.4.1
//#include <GxGDEW027C44/GxGDEW027C44.h> // 2.7" b/w/r
//#include <GxGDEW027W3/GxGDEW027W3.h> // 2.7" b/w
//#include <GxGDEY027T91/GxGDEY027T91.h> // 2.7" b/w
//#include <GxGDEW0371W7/GxGDEW0371W7.h>
#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>
#include <SPI.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMonoBold9pt7b.h>
#include <Fonts/FreeMonoBold12pt7b.h>
#include <Fonts/FreeMonoBold18pt7b.h>
#include <Fonts/FreeMonoBold24pt7b.h>
#include <esp_sleep.h>
#define EPD_CS 15
#define EPD_DC 21
#define EPD_RSET 22
#define EPD_BUSY 23
#define EPD_SCLK 4
#define EPD_MISO -1
#define EPD_MOSI 5
#define uS_TO_S_FACTOR 1000000 // Conversion factor for micro seconds to seconds
GxIO_Class io(SPI, EPD_CS, EPD_DC, EPD_RSET);
GxEPD_Class display(io, EPD_RSET, EPD_BUSY);
void enterSleepMode() {
esp_sleep_enable_timer_wakeup(10 * uS_TO_S_FACTOR); // Wake up every 10 seconds
esp_deep_sleep_start();
}
void setup() {
SPI.begin(EPD_SCLK, EPD_MISO, EPD_MOSI);
display.init();
display.setRotation(1);
display.fillScreen(GxEPD_WHITE); // Clear the screen
display.drawRect(10, 10, 150, 60, GxEPD_BLACK); // Draw a rectangle
delay(1500);
display.fillCircle(80, 80, 60, GxEPD_BLACK); // Draw a filled circle
delay(1500);
display.setCursor(0, 65);
display.println("MAAAAAAAH");
display.setFont(&FreeMonoBold9pt7b);
}
void loop() {
display.setRotation(1);
display.fillScreen(GxEPD_WHITE); // Clear the screen
display.drawRect(10, 10, 150, 60, GxEPD_BLACK); // Draw a rectangle
delay(1500);
display.fillCircle(80, 80, 60, GxEPD_BLACK); // Draw a filled circle
delay(1500);
display.setCursor(0, 65);
display.println("MAAAAAAAH");
display.setFont(&FreeMonoBold9pt7b);
}