基于SSD1608的电子纸显示屏的CircuitPython `displayio`驱动程序
项目描述
简介
CircuitPython displayio 驱动程序,用于SSD1608基于的电子纸显示屏
依赖项
此驱动程序依赖于
请确保所有依赖项都可在CircuitPython文件系统中使用。这可以通过下载Adafruit库和驱动程序包轻松实现。
从PyPI安装
在支持GNU/Linux系统(如树莓派)上,您可以从PyPI本地安装驱动程序。为当前用户安装
pip3 install adafruit-circuitpython-ssd1608
为系统范围安装(在某些情况下可能需要)
sudo pip3 install adafruit-circuitpython-ssd1608
在当前项目虚拟环境中安装
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-ssd1608
使用示例
"""Simple test script for 1.54" 200x200 monochrome display.
Supported products:
* Adafruit 1.54" Monochrome ePaper Display Breakout
* https://www.adafruit.com/product/4196
"""
import time
import board
import displayio
import fourwire
import adafruit_ssd1608
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_ssd1608.SSD1608(display_bus, width=200, height=200, busy_pin=epd_busy)
g = displayio.Group()
f = open("/display-ruler.bmp", "rb")
pic = displayio.OnDiskBitmap(f)
# CircuitPython 6 & 7 compatible
t = displayio.TileGrid(
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
)
# CircuitPython 7 compatible only
# 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上找到。
有关构建库文档的信息,请参阅此指南。
贡献
欢迎贡献!在向此项目贡献之前,请阅读我们的行为准则,以帮助该项目保持友好。
项目详情
关闭
哈希 for adafruit_circuitpython_ssd1608-1.3.1-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ede6ff88e14692b970e68b07c39b7e3f58bede78fb73b5a3d53ac9e9d7402158 |
|
MD5 | 44985ce0cde613e215b0a23e6070304e |
|
BLAKE2b-256 | 80e16e0f4482cda1559a658abdc4ecba9b0333ee364367c805a4580ec5a8a1bc |