Tulisan China Oled SSD1306 I2C Pakai Library u8g2

Kode Program

/*
  Copyright (c) 2016, ol******@gm***.com
  All rights reserved.
*/

#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>

U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/U8X8_PIN_NONE);

void setup(void) {
  u8g2.begin();

  // enable UTF8 support for the Arduino print() function
  u8g2.enableUTF8Print();
}

void loop(void) {
  u8g2.setFontDirection(0);
  u8g2.firstPage();
  do {
    // Chinese "Hello World"
    u8g2.setFont(u8g2_font_unifont_t_chinese2);
    u8g2.setCursor(0, 15);
    u8g2.print("你好世界");
  } while (u8g2.nextPage());
  delay(1000);
}

Hasil

Bahasa China Oled SSD1306 I2C Pakai Library u8g2

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top