#include <ESP8266WiFi.h>
#include <U8g2lib.h>
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ /*SCL*/13, /* data=*//* SDA*/12, /* reset=*/ U8X8_PIN_NONE);
void setup(void) {
u8g2.begin();
}
void drawLogo(void)
{
u8g2.setFontMode(1); // Transparent
#ifdef MINI_LOGO
u8g2.setFontDirection(0);
u8g2.setFont(u8g2_font_inb16_mf);
u8g2.drawStr(0, 22, "U");
u8g2.setFontDirection(1);
u8g2.setFont(u8g2_font_inb19_mn);
u8g2.drawStr(14,8,"8");
u8g2.setFontDirection(0);
u8g2.setFont(u8g2_font_inb16_mf);
u8g2.drawStr(36,22,"g");
u8g2.drawStr(48,22,"\xb2");
u8g2.drawHLine(2, 25, 34);
u8g2.drawHLine(3, 26, 34);
u8g2.drawVLine(32, 22, 12);
u8g2.drawVLine(33, 23, 12);
#else
u8g2.setFontDirection(0);
u8g2.setFont(u8g2_font_inb24_mf);
u8g2.drawStr(0, 30, "U");
u8g2.setFontDirection(1);
u8g2.setFont(u8g2_font_inb30
(记录)Arduino环境ESP8266-----U8G2
最新推荐文章于 2024-06-16 18:00:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)