| 12345678910111213141516171819202122232425262728293031 |
- // GxEPD2_MinimumExample.ino by Jean-Marc Zingg
- // uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX
- #include <GFX.h>
- #define ENABLE_GxEPD2_GFX 0
- #include <GxEPD2_BW.h> // including both doesn't hurt
- #include <GxEPD2_3C.h> // including both doesn't hurt
- // copy constructor for your e-paper from GxEPD2_Example.ino, and for AVR needed #defines
- #define MAX_DISPLAY_BUFFER_SIZE 800 //
- #define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
- //GxEPD2_BW<GxEPD2_154, MAX_HEIGHT(GxEPD2_154)> display(GxEPD2_154(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEP015OC1 no longer available
- GxEPD2_BW<GxEPD2_154_D67, MAX_HEIGHT(GxEPD2_154_D67)> display(GxEPD2_154_D67(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0154D67
- void setup()
- {
- display.init();
- // comment out next line to have no or minimal Adafruit_GFX code
- display.setTextColor(GxEPD_BLACK);
- display.firstPage();
- do
- {
- display.fillScreen(GxEPD_WHITE);
- // comment out next line to have no or minimal Adafruit_GFX code
- display.print("Hello World!");
- }
- while (display.nextPage());
- }
- void loop() {};
|