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

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif

// U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);   // All Boards without Reset of the Display
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

static const unsigned char PROGMEM logo_48X16[] = {

0x00,0x00,0x10,0x0A,0x02,0x00,0xC0,0xF0,0xFF,0x03,0xFE,0xFF,0x31,
0x1A,0x03,0x00,0x03,0x30,0x1A,0x03,0x00,0x03,0xF0,0xFF,0x03,0x00,
0x03,0x60,0x80,0x01,0x00,0x03,0xE0,0xFF,0x03,0x00,0x03,0x60,0x8C,
0x01,0x00,0x03,0xE0,0xFF,0x01,0x00,0x03,0x60,0x8C,0x01,0x00,0x03,
0xE0,0xFF,0x01,0x00,0x03,0xE0,0xFF,0x01,0x00,0x03,0x00,0x0C,0x0E,
0x00,0x83,0xFD,0xFF,0x0F,0xFF,0xFF,0x03,0x0C,0x00,0x03,0x00,0x00,
0x0C,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00


};

void setup(void) {
  u8g2.begin();
  u8g2.enableUTF8Print();		// enable UTF8 support for the Arduino print() function
  u8g2.setFont(u8g2_font_unifont_t_chinese1);  // use chinese2 for all the glyphs of "你好世界"
  u8g2.setFontDirection(0);

  u8g2.clearBuffer();
  u8g2.drawXBMP(10, 10, 40, 18, logo_48X16); //繪圖
  u8g2.sendBuffer();
  delay(1000);

}

void loop(void) {

}