Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Arduino.h>
- #include <U8g2lib.h>
- #include <SPI.h>
- U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
- void setup(void) {
- u8g2.begin();
- }
- void loop(void) {
- u8g2.clearBuffer(); // clear the internal memory
- u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
- u8g2.drawStr(0,10,"Hello World!"); // write something to the internal memory
- u8g2.sendBuffer(); // transfer internal memory to the display
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement