Advertisement
LeventeDaradici

128X64 I2C ST7567S COG Graphic Display ARDUINO

Sep 19th, 2022 (edited)
2,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  1. //
  2. // 128X64 I2C ST7567S COG Graphic Display ARDUINO
  3. //
  4. // https://www.youtube.com/c/LeventeDaradici/videos
  5. // the display was bought from here: https://www.aliexpress.com/item/1005004617618178.html
  6. // short review: https://satelit-info.com/phpBB3/viewtopic.php?f=172&t=3338
  7. //
  8. #include <U8g2lib.h>
  9. #include <Wire.h>
  10.  
  11. U8G2_ST7567_ENH_DG128064I_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE);
  12.  
  13. void setup(void)
  14.      {
  15.         u8g2.setI2CAddress(0x3F * 2);
  16.         u8g2.begin();
  17.         u8g2.clearBuffer(); // clear the internal memory
  18.         u8g2.setFont(u8g2_font_ncenB08_tr);
  19.         //u8g2.setFont(u8g2_font_cu12_tr);
  20.         u8g2.drawStr(0, 10, "Hello World!"); // write something to the internal memory
  21.         u8g2.sendBuffer(); // transfer internal memory to the display
  22.       }
  23. void loop(void)
  24.      {
  25.  
  26.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement