跳转到主要内容

SPD1656驱动ACeP(七色)电子纸显示器的驱动程序

项目描述

介绍

Documentation Status Discord Build Status Code Style: Black

SPD1656驱动ACeP(七色)电子纸显示器的驱动程序。

请注意,我们目前还没有Blinka支持。因此,它不会与Raspberry Pi一起工作。

依赖关系

此驱动程序依赖于

请确保所有依赖项都可在CircuitPython文件系统中使用。这可以通过下载Adafruit库和驱动程序捆绑包或使用circup安装单个库来实现。

此驱动程序支持常见的4英寸和5.65英寸ACeP显示器。

从PyPI安装

在支持的GNU/Linux系统(如Raspberry Pi)上,您可以从PyPI本地安装驱动程序。为当前用户安装

pip3 install adafruit-circuitpython-spd1656

全局安装(在某些情况下可能需要)

sudo pip3 install adafruit-circuitpython-spd1656

在当前项目的虚拟环境中安装

mkdir project-name && cd project-name
python3 -m venv .venv
source .env/bin/activate
pip3 install adafruit-circuitpython-spd1656

使用Circup将驱动程序安装到连接的CircuitPython设备

请确保您已在Python环境中安装了 circup。如果需要,请使用以下命令进行安装:

pip3 install circup

安装 circup 并连接您的CircuitPython设备后,请使用以下命令进行安装:

circup install adafruit_spd1656

或者使用以下命令更新现有版本:

circup update

使用示例

# SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense

"""Simple test script for 5.6" 600x448 7-color ACeP display.
  """
# pylint: disable=no-member

import time
import board
import displayio
import adafruit_spd1656

displayio.release_displays()

# This pinout works on a Feather RP2040 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.D11
epd_busy = board.D12

display_bus = fourwire.FourWire(
    spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)

display = adafruit_spd1656.SPD1656(
    display_bus, width=600, height=448, busy_pin=epd_busy
)

g = displayio.Group()

fn = "/display-ruler-720p.bmp"

with open(fn, "rb") as f:
    pic = displayio.OnDiskBitmap(f)
    t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
    g.append(t)

    display.root_group = g

    display.refresh()

    time.sleep(120)

文档

有关该库的API文档,请访问 Read the Docs

有关构建库文档的信息,请参阅 此指南

贡献

欢迎贡献!在为此项目做出贡献之前,请阅读我们的 行为准则,以帮助该项目保持开放和友好。

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分布

adafruit-circuitpython-spd1656-0.9.0.tar.gz (34.5 kB 查看哈希值)

上传时间

构建分布

adafruit_circuitpython_spd1656-0.9.0-py3-none-any.whl (5.6 kB 查看哈希值)

上传时间 Python 3

由以下机构支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面