跳转到主要内容

Adafruit MatrixPortal M4、Adafruit RGB Matrix Shield + Metro M4 Airlift Lite 和 Adafruit RGB Matrix FeatherWings 的 CircuitPython 辅助程序

项目描述

简介

Documentation Status Discord Build Status Code Style: Black

Adafruit MatrixPortal M4、Adafruit RGB Matrix Shield + Metro M4 Airlift Lite 和 Adafruit RGB Matrix FeatherWings 的 CircuitPython 辅助程序

依赖项

此驱动程序依赖于

请确保所有依赖项都可在 CircuitPython 文件系统中使用。这可以通过下载 Adafruit 库和驱动程序包 来轻松实现。

使用示例

import time
import board
import terminalio
from adafruit_matrixportal.matrixportal import MatrixPortal

# --- Display setup ---
matrixportal = MatrixPortal(status_neopixel=board.NEOPIXEL, debug=True)

# Create a new label with the color and text selected
matrixportal.add_text(
    text_font=terminalio.FONT,
    text_position=(0, (matrixportal.graphics.display.height // 2) - 1),
    scrolling=True,
)

SCROLL_DELAY = 0.03

contents = [
    { 'text': 'THIS IS RED',  'color': '#cf2727'},
    { 'text': 'THIS IS BLUE', 'color': '#0846e4'},
]

while True:
    for content in contents:
        matrixportal.set_text(content['text'])

        # Set the text color
        matrixportal.set_text_color(content['color'])

        # Scroll it
        matrixportal.scroll_text(SCROLL_DELAY)

文档

此库的API文档可在 Read the Docs 上找到。

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

贡献

欢迎贡献!请在贡献之前阅读我们的 行为准则,以帮助本项目保持友好。

项目详情


下载文件

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

源分发

构建分发

支持者

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