OLED 屏幕介绍
- 芯片型号 SSD1306
- 分辨率 128*64
- 供电范围 直流 3.3-5v
- 体积 27272mm
- 尺寸
- SPI 4线接法
- IIC 接法
OLED与ESP8266 4线SPI接线
ESP8266 | OLED |
---|---|
IO_12 | DC |
IO_13 | DIN(MOSI) |
IO_14 | CLK |
IO_15 | RST |
GND | CS |
ESP8266 SPI
U8g2库
- u8g2_SetFontMode
```c
/*
set one of:
U8G2_FONT_MODE_TRANSPARENT
U8G2_FONT_MODE_SOLID
U8G2_FONT_MODE_NONE
This has been changed for the new font procedures
*/
void u8g2_SetFontMode(u8g2_t *u8g2, uint8_t is_transparent)
**说明:**定义字形和字符串绘制函数是否写入背景色(模式0 / solid,is_transparent = 0)或不写入背景颜色(模式1 /透明,is_transparent = 1)。 默认模式为0(字符的背景颜色被覆盖)。
- u8g2_SetFontDirection
void u8g2_SetFontDirection(u8g2_t *u8g2, uint8_t dir)
```
取模软件
天气获取API
http://wthrcdn.etouch.cn/WeatherApi?city=%E5%B9%BF%E5%B7%9E
參考
- https://www.jianshu.com/p/404907770c90
- https://www.cnblogs.com/huan-huan/p/8528307.html
- https://mbb.eet-china.com/forum/topic/74077_1_1.html
- https://blog.csdn.net/dpjcn1990/article/details/92831760
- https://blog.csdn.net/notMine/article/details/79317782
- http://www.mculover666.cn/posts/3603126757/ (RT-Thread Oled)