CircuitPython `displayio` 驱动程序,用于基于SSD1681的电子纸显示屏
项目描述
简介
CircuitPython displayio 驱动程序,用于SSD1681电子纸显示屏
依赖项
此驱动程序依赖于
请确保所有依赖项都在CircuitPython文件系统中可用。这可以通过下载 Adafruit库和驱动程序包 或使用 circup 安装单个库来实现。
Adafruit 1.54” 三色电子墨水/电子纸 200x200 显示屏(带SRAM)
从PyPI安装
在支持GNU/Linux的系统(如Raspberry Pi)上,您可以从PyPI本地安装驱动程序 。 要为当前用户安装
pip3 install adafruit-circuitpython-ssd1681
要全局安装(在某些情况下可能需要)
sudo pip3 install adafruit-circuitpython-ssd1681
要在当前项目的虚拟环境中安装
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-ssd1681
使用示例
import time
import board
import displayio
import fourwire
import adafruit_ssd1681
displayio.release_displays()
# This pinout works on a Feather M4 and may need to be altered for other boards.
spi = board.SPI() # Uses SCK and MOSI
epd_cs = board.D9
epd_dc = board.D10
epd_reset = board.D5
epd_busy = board.D6
display_bus = fourwire.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
time.sleep(1)
display = adafruit_ssd1681.SSD1681(
display_bus, width=200, height=200, busy_pin=epd_busy, rotation=180
)
g = displayio.Group()
# CircuitPython 6 & 7 compatible
f = open("/display-ruler.bmp", "rb")
pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
)
# # CircuitPython 7 compatible only
# pic = displayio.OnDiskBitmap("/display-ruler.bmp")
# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
g.append(t)
display.root_group = g
display.refresh()
print("refreshed")
time.sleep(120)
文档
该库的API文档可以在 Read the Docs 上找到。
有关构建库文档的信息,请参阅本指南。
贡献
欢迎贡献!在为此项目做出贡献之前,请阅读我们的行为准则,以帮助保持项目的友好氛围。
项目详情
关闭
adafruit-circuitpython-ssd1681-1.2.2.tar.gz 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 0a43c703c2ea55580fd8c092a7f979efcff0ea81b1c9498ccf9acb55f657b31d |
|
MD5 | cdae9d60adc3f3fb88facebc2605123a |
|
BLAKE2b-256 | 1ea6eae816982d2e477b2cb1a3e75f3200a9fc8d2a25cd487f6ecdb3901b4db4 |
关闭
adafruit_circuitpython_ssd1681-1.2.2-py3-none-any.whl 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | cc368b03c80ac2fbd4a99c1faabaa6aedb36aae2cb6747e2a0496b3ce01156bb |
|
MD5 | 750af2bb57f578c3022b53581b47beb2 |
|
BLAKE2b-256 | 7b5a34ae2e3fd8cba0f701e73757557ab4638ea581cb2a969a515b95442a1f4c |