Helper library for the Adafruit ESP32-S2 TFT Feather
Project description
Introduction
Helper library for the Adafruit ESP32-S2 TFT Feather.
Dependencies
This driver depends on:
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.
Adafruit ESP32-S2 TFT Feather
Installing to a Connected CircuitPython Device with Circup
Make sure that you have circup installed in your Python environment. Install it with the following command if necessary:
pip3 install circup
With circup installed and your CircuitPython device connected use the following command to install:
circup install adafruit_esp32s2tft
Or the following command to update an existing version:
circup update
Usage Example
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.root_group = 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))
Documentation
API documentation for this library can be found on Read the Docs.
For information on building library documentation, please check out this guide.
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file adafruit_circuitpython_esp32s2tft-1.2.2.tar.gz
.
File metadata
- Download URL: adafruit_circuitpython_esp32s2tft-1.2.2.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae1f3e6c105ce483b29bee1a410f4d56888c450054980b5a71ca81a5bd5f1831 |
|
MD5 | 59eef92597c533f896cbebd9ae996b71 |
|
BLAKE2b-256 | a0bc3349993eeb93f141e89d2d80bf6e8c64c60277a80d0ee91f1db118f0f58e |
File details
Details for the file adafruit_circuitpython_esp32s2tft-1.2.2-py3-none-any.whl
.
File metadata
- Download URL: adafruit_circuitpython_esp32s2tft-1.2.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fae9270219eeb200c70978b8c7831e9c61c9573fe3f7457e4630e04bebd519c5 |
|
MD5 | 95b8785c898ae41de1980d63346aa90d |
|
BLAKE2b-256 | a94104782d752207ebf4b7f615092e6e0e10a8990ff272c13b99121b7cf4824d |