Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Arduino sketch pro ESP8266 (MeteoV4.1) s ePaper cenovkou 2.9" b/w/r nebo
- * 4" b/w/r
- *
- * Potrebne knihovny:
- * ePaper: https://github.com/ZinggJM/GxEPD
- * ESP8266: https://github.com/esp8266/Arduino
- *
- * Upravil: Petr Sramek (@chiptronCZ)
- */
- #include <GxEPD.h>
- #include <Fonts/FreeMonoBold9pt7b.h>
- // select the display class to use, only one, copy from GxEPD_Example
- #include <GxGDEW029Z10/GxGDEW029Z10.h> // 2.9" b/w/r
- //#include <GxGDEW042Z15/GxGDEW042Z15.h> // 4.2" b/w/r
- #include <GxIO/GxIO_SPI/GxIO_SPI.h>
- #include <GxIO/GxIO.h>
- // constructor for ESP8266, copy from GxEPD_Example else
- GxIO_Class io(SPI, /*CS=*/ 15, /*DC=*/ 0, /*RST=*/ 2); // arbitrary selection of 8, 9 selected for default of GxEPD_Class
- GxEPD_Class display(io, /*RST=*/ 2, /*BUSY=*/ 12); // default selection of (9), 7
- const char* name = "FreeMonoBold9pt7b";
- const GFXfont* f = &FreeMonoBold9pt7b;
- void setup()
- {
- Serial.begin(115200);
- display.init();
- display.setRotation(0);
- Serial.println("Erase display");
- display.eraseDisplay();
- display.fillScreen(GxEPD_WHITE);
- display.setTextColor(GxEPD_BLACK);
- display.setFont(f);
- display.setCursor(0, 20);
- Serial.println("Write");
- display.println("Bastlirsky pokec");
- display.setTextColor(GxEPD_RED);
- display.println("@KutilDomaci a @chiptronCZ");
- display.update();
- Serial.println("Finished");
- }
- void loop()
- {
- }
Add Comment
Please, Sign In to add comment