GxEPD2_MinimumExample.ino 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // GxEPD2_MinimumExample.ino by Jean-Marc Zingg
  2. // purpose is e.g. to determine minimum code and ram use by this library
  3. // see GxEPD2_wiring_examples.h of GxEPD2_Example for wiring suggestions and examples
  4. // if you use a different wiring, you need to adapt the constructor parameters!
  5. // uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX, to use less code and ram
  6. //#include <GFX.h>
  7. #include <GxEPD2_BW.h> // including both doesn't use more code or ram
  8. #include <GxEPD2_3C.h> // including both doesn't use more code or ram
  9. // select the display class and display driver class in the following file (new style):
  10. #include "GxEPD2_display_selection_new_style.h"
  11. // alternately you can copy the constructor from GxEPD2_display_selection.h or GxEPD2_display_selection_added.h of GxEPD2_Example to here
  12. // e.g. for Wemos D1 mini:
  13. //GxEPD2_BW<GxEPD2_154_D67, GxEPD2_154_D67::HEIGHT> display(GxEPD2_154_D67(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0154D67
  14. void setup()
  15. {
  16. display.init();
  17. // comment out next line to have no or minimal Adafruit_GFX code
  18. display.setTextColor(GxEPD_BLACK);
  19. display.firstPage();
  20. do
  21. {
  22. display.fillScreen(GxEPD_WHITE);
  23. // comment out next line to have no or minimal Adafruit_GFX code
  24. display.print("Hello World!");
  25. }
  26. while (display.nextPage());
  27. }
  28. void loop() {};