树莓派安装python3.9以及pip换源_树莓派安装pip_LJX的博客-CSDN博客
树莓派使用 Python 驱动 SSD1306(IIC/SPI 通信)
进阶篇——树莓派OLED模块的使用 大量例程详解_oled例程_玩转智能机器人的博客-CSDN博客
使用OS 版本 2020-02-13-raspbian-buster.rar
from luma.core.interface.serial import i2c, spi
from luma.core.render import canvas
from luma.oled.device import ssd1306
serial = i2c(port=1, address=0x3C)
serial = spi(device=0, port=0)
device = ssd1306(serial)
with canvas(device) as draw:
draw.rectangle(device.bounding_box, outline="white", fill="black")
draw.text((30, 40), "Hello World!", fill="white")
while (True):
pass
运行 python luma-ssd1306.py
退出CTRL + C