Adafruit ESP32-S2 TFT Feather 的帮助程序库
项目描述
介绍
Adafruit ESP32-S2 TFT Feather 的帮助程序库。
依赖项
此驱动程序取决于:
请确保 CircuitPython 文件系统上的所有依赖项都可用。这可以通过下载 Adafruit 库和驱动程序包轻松实现, 或者可以使用 circup安装单个库。
Adafruit ESP32-S2 TFT 羽毛
使用 Circup 安装到连接的 CircuitPython 设备
确保在 Python 环境中安装了circup 。如有必要,使用以下命令安装它:
pip3 install circup
安装circup并连接CircuitPython设备后,使用以下命令进行安装:
circup install adafruit_esp32s2tft
或者使用以下命令更新现有版本:
circup update
使用示例
import random
from rainbowio import colorwheel
from adafruit_esp32s2tft import ESP32S2TFT
esp32s2tft = ESP32S2TFT(
default_bg=0xFFFF00,
scale=2,
)
# Create the labels
esp32s2tft.add_text(
text="ESP32-S2", text_position=(10, 10), text_scale=2, text_color=0xFF00FF
)
esp32s2tft.add_text(
text="TFT Feather",
text_position=(60, 30),
text_anchor_point=(0.5, 0.5),
text_color=0xFF00FF,
)
button_label = esp32s2tft.add_text(
text="Press BOOT0 Button",
line_spacing=1.0,
text_position=(60, 50),
text_anchor_point=(0.5, 0.5),
text_color=0x606060,
)
esp32s2tft.display.show(esp32s2tft.splash)
while True:
esp32s2tft.set_text_color(
0xFF0000 if esp32s2tft.peripherals.button else 0x606060, button_label
)
esp32s2tft.peripherals.led = esp32s2tft.peripherals.button
if esp32s2tft.peripherals.button:
esp32s2tft.peripherals.neopixel[0] = colorwheel(random.randint(0, 255))
文档
这个库的 API 文档可以在Read the Docs上找到。
有关构建库文档的信息,请查看 本指南。
贡献
欢迎投稿! 在帮助这个项目保持受欢迎之前,请阅读我们的行为准则。
项目详情
关
adafruit_circuitpython_esp32s2tft -1.1.6-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 2d41aaf6f3053893ab4f5852b02a9c1d27fb921cc6dd2f94344b1ed39e1d5c71 |
|
| MD5 | fa5f2b5e7c912a95691a10d2f3a62df1 |
|
| 布莱克2-256 | 64af02bb2e9214e56651684d5912944e4be4dbe94aa60463fa7768cedf239834 |