Advertisement
Guest User

epaper skeč

a guest
Jul 16th, 2018
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #include <GxEPD.h>
  2. #include <GxGDEP015OC1/GxGDEP015OC1.cpp>
  3. #include <GxIO/GxIO_SPI/GxIO_SPI.cpp>
  4. #include <GxIO/GxIO.cpp>
  5. #include <Fonts/FreeSansBold18pt7b.h>
  6. #define PIN_SPI_SS (10)
  7. #define PIN_SPI_MOSI (11)
  8. #define PIN_SPI_MISO (12)
  9. #define PIN_SPI_SCK (13)
  10. GxIO_Class io(SPI, SS, 8, 9);
  11. GxEPD_Class display(io);
  12. void setup(void){
  13. display.init();
  14. display.drawPaged(primer);
  15. }
  16. void loop(){
  17. }
  18. void primer(){
  19. const GFXfont* f = &FreeSansBold18pt7b;
  20. display.fillScreen(GxEPD_WHITE);
  21. display.setTextColor(GxEPD_BLACK);
  22. display.setFont(f);
  23. display.setCursor(25, 60);
  24. display.print("SK Labs");
  25. display.drawRect( 5, 5, 190, 190, GxEPD_BLACK);
  26. display.fillRect( 15, 105, 170, 80, GxEPD_BLACK);
  27. display.setTextColor(GxEPD_WHITE);
  28. display.setCursor(50, 160);
  29. display.print("Rulez");
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement