#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[] = {
0xF0, 0x03, 0xF8, 0x07, 0x1C, 0x0E, 0x06, 0x18, 0xC7, 0x38, 0xC3, 0x30, 0xF3, 0x33, 0xF3, 0x33,
0xC3, 0x30, 0xC7, 0x38, 0x06, 0x1C, 0x1C, 0x3E, 0xF8, 0x7F, 0xF0, 0xFB, 0x00, 0xF0, 0x00, 0x60
};
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, 16, 16, logo_48X16); //繪圖
u8g2.sendBuffer();
delay(1000);
}
void loop(void) {
}