基于SSD1680的电子纸显示屏的CircuitPython `displayio`驱动程序
项目描述
简介
CircuitPython displayio 驱动程序,用于SSD1680型电子纸显示屏
依赖项
此驱动程序依赖于
请确保所有依赖项都可在CircuitPython文件系统中使用。这可以通过下载 Adafruit库和驱动程序捆绑包 或使用 circup 安装单个库轻松实现。
Adafruit 2.13” 250x122 三色电子墨水/电子纸显示屏 - SSD1680驱动程序
Adafruit 2.13” 高清三色电子墨水/电子纸显示屏FeatherWing - 250x122 RW面板,带SSD1680
从PyPI安装
在支持GNU/Linux系统(如Raspberry Pi)上,您可以从PyPI本地安装驱动程序。要为当前用户安装
pip3 install adafruit-circuitpython-ssd1680
要系统范围安装(在某些情况下可能需要)
sudo pip3 install adafruit-circuitpython-ssd1680
要在当前项目的虚拟环境中安装
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-ssd1680
使用示例
import time
import board
import displayio
import fourwire
import adafruit_ssd1680
displayio.release_displays()
# This pinout works on a Metro 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.D8 # Set to None for FeatherWing
epd_busy = board.D7 # Set to None for FeatherWing
display_bus = fourwire.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
time.sleep(1)
display = adafruit_ssd1680.SSD1680(
display_bus,
width=250,
height=122,
busy_pin=epd_busy,
highlight_color=0xFF0000,
rotation=270,
)
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_ssd1680-1.2.3.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8842058d08a42fc7d677fc67581a87c6ee376ba89d5c98f0fc17b6cf0686fca2 |
|
MD5 | fa694d95a5958cff4d0f35183b8a4f9e |
|
BLAKE2b-256 | df1dea3f66a5e2441603703efd3cd733bf261c528e6952c83b63c92b69593991 |
关闭
adafruit_circuitpython_ssd1680-1.2.3-py3-none-any.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9715c2c66554d7ff81f76b1227b4067c71d94e64a89825667feaed006f7deaf3 |
|
MD5 | fabefbf93eda0c62eb5259a602841101 |
|
BLAKE2b-256 | 94152ceb5db529a906b840acf25266061e0cf79c21b3e2e9eb7c67ed3701e406 |