A helper library for displaying lines of text on a microcontroller with a built-in display, or externally connected display.
Project description
Introduction
A helper library for displaying lines of text on a display using displayio.
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.
This library works with any microcontroller with a built in display, or a microcontroller with an external display connected.
Usage Example
This example takes the microcontroller CPU temperature in C and F, and displays it on the display under the heading “Temperature Data!”.
import microcontroller
from adafruit_simple_text_display import SimpleTextDisplay
temperature_data = SimpleTextDisplay(title="Temperature Data!", title_scale=2)
while True:
temperature_data[0].text = "Temperature: {:.2f} degrees C".format(
microcontroller.cpu.temperature
)
temperature_data[1].text = "Temperature: {:.2f} degrees F".format(
(microcontroller.cpu.temperature * (9 / 5) + 32)
)
temperature_data.show()
Documentation
API documentation for this library can be found on Read the Docs.
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
Documentation
For information on building library documentation, please check out this guide.
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
File details
Details for the file adafruit-circuitpython-simple-text-display-1.2.3.tar.gz
.
File metadata
- Download URL: adafruit-circuitpython-simple-text-display-1.2.3.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 683013d248a56a81b0a02b67fb9f7c4a15fb04182fd90105cd17c0c0e4d70ddc |
|
MD5 | d6dd3d20e3477fa3c0a6213c204a4020 |
|
BLAKE2b-256 | fecb927d3e0acf0f1742592f14c3b06b97409e4ace46df84e0a9eb30392a998f |