(一),使用U8字库占用内存太大,Nano板不适合,请使用下库:
//OLED
#include <ACROBOTIC_SSD1306.h>
#include <Wire.h>
//初始化并显示
Wire.begin();
oled.init();
oled.clearDisplay(); // Clear screen
oled.setTextXY(0,0); // Set cursor position, start of line 0
//字符串
oled.putString("xxx");
//整数
oled.putNubmer(Num);
//浮点
oled.putFloat(Num,2);//小数点后两位
//接线
SDA -> A4
SCL -> A5