Introduction
============
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-st7789/badge/?version=latest
:target: https://docs.circuitpython.org/projects/st7789/en/latest/
:alt: Documentation Status
.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_ST7789/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_CircuitPython_ST7789/actions/
:alt: Build Status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: Black
displayio driver for ST7789 TFT-LCD displays.
Dependencies
=============
This driver depends on:
* `Adafruit CircuitPython 4.0.0-beta.0+ <https://github.com/adafruit/circuitpython>`_
Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
Usage Example
=============
.. code-block:: python
import board
import displayio
# Starting in CircuitPython 9.x fourwire will be a seperate internal library
# rather than a component of the displayio library
try:
from fourwire import FourWire
except ImportError:
from displayio import FourWire
from adafruit_st7789 import ST7789
displayio.release_displays()
spi = board.SPI()
while not spi.try_lock():
pass
spi.configure(baudrate=24000000) # Configure SPI for 24MHz
spi.unlock()
tft_cs = board.D5
tft_dc = board.D6
display_bus = FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=board.D9)
display = ST7789(display_bus, width=240, height=240, rowstart=80)
# Make the display context
splash = displayio.Group()
display.root_group = splash
color_bitmap = displayio.Bitmap(240, 240, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0xFF0000
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
x=0, y=0)
splash.append(bg_sprite)
while True:
pass
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/st7789/en/latest/>`_.
For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
Contributing
============
Contributions are welcome! Please read our `Code of Conduct
<https://github.com/adafruit/Adafruit_CircuitPython_ST7789/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.
Raw data
{
"_id": null,
"home_page": null,
"name": "adafruit-circuitpython-st7789",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adafruit, blinka, circuitpython, micropython, st7789, display, tft, lcd, displayio",
"author": null,
"author_email": "Adafruit Industries <circuitpython@adafruit.com>",
"download_url": "https://files.pythonhosted.org/packages/0e/6d/1198e5132ce895d75c4a21115b5a92a00536c191b90ad4d6cfd629fbcf52/adafruit_circuitpython_st7789-1.6.2.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-st7789/badge/?version=latest\n :target: https://docs.circuitpython.org/projects/st7789/en/latest/\n :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n :target: https://adafru.it/discord\n :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_ST7789/workflows/Build%20CI/badge.svg\n :target: https://github.com/adafruit/Adafruit_CircuitPython_ST7789/actions/\n :alt: Build Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Code Style: Black\n\ndisplayio driver for ST7789 TFT-LCD displays.\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython 4.0.0-beta.0+ <https://github.com/adafruit/circuitpython>`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.\n\nUsage Example\n=============\n\n.. code-block:: python\n\n import board\n import displayio\n # Starting in CircuitPython 9.x fourwire will be a seperate internal library\n # rather than a component of the displayio library\n try:\n from fourwire import FourWire\n except ImportError:\n from displayio import FourWire\n\n from adafruit_st7789 import ST7789\n\n displayio.release_displays()\n\n spi = board.SPI()\n while not spi.try_lock():\n pass\n spi.configure(baudrate=24000000) # Configure SPI for 24MHz\n spi.unlock()\n tft_cs = board.D5\n tft_dc = board.D6\n\n display_bus = FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=board.D9)\n\n display = ST7789(display_bus, width=240, height=240, rowstart=80)\n\n # Make the display context\n splash = displayio.Group()\n display.root_group = splash\n\n color_bitmap = displayio.Bitmap(240, 240, 1)\n color_palette = displayio.Palette(1)\n color_palette[0] = 0xFF0000\n\n bg_sprite = displayio.TileGrid(color_bitmap,\n pixel_shader=color_palette,\n x=0, y=0)\n splash.append(bg_sprite)\n\n while True:\n pass\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/st7789/en/latest/>`_.\n\nFor information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/adafruit/Adafruit_CircuitPython_ST7789/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "displayio driver for ST7789 TFT-LCD displays.",
"version": "1.6.2",
"project_urls": {
"Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_ST7789"
},
"split_keywords": [
"adafruit",
" blinka",
" circuitpython",
" micropython",
" st7789",
" display",
" tft",
" lcd",
" displayio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7f8695c1623f8a66eb5d0064f07104bddd42042b0cd9a8a416c64a23ebc71cc8",
"md5": "4c92dd2dca2b6d051e54f88894b97909",
"sha256": "b833632b5b99d96699f20146a0892411f7fc513f0bea9b6e214873cb10f1ce4f"
},
"downloads": -1,
"filename": "adafruit_circuitpython_st7789-1.6.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4c92dd2dca2b6d051e54f88894b97909",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4564,
"upload_time": "2024-06-17T15:47:02",
"upload_time_iso_8601": "2024-06-17T15:47:02.000581Z",
"url": "https://files.pythonhosted.org/packages/7f/86/95c1623f8a66eb5d0064f07104bddd42042b0cd9a8a416c64a23ebc71cc8/adafruit_circuitpython_st7789-1.6.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0e6d1198e5132ce895d75c4a21115b5a92a00536c191b90ad4d6cfd629fbcf52",
"md5": "d0c4f98081b219b02be1ad36dceebe12",
"sha256": "41f9faa03a4a4ecb41f51700030501598b2387633d318fce7d3a74fdbfad2347"
},
"downloads": -1,
"filename": "adafruit_circuitpython_st7789-1.6.2.tar.gz",
"has_sig": false,
"md5_digest": "d0c4f98081b219b02be1ad36dceebe12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 28116,
"upload_time": "2024-06-17T15:47:03",
"upload_time_iso_8601": "2024-06-17T15:47:03.158940Z",
"url": "https://files.pythonhosted.org/packages/0e/6d/1198e5132ce895d75c4a21115b5a92a00536c191b90ad4d6cfd629fbcf52/adafruit_circuitpython_st7789-1.6.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-17 15:47:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adafruit",
"github_project": "Adafruit_CircuitPython_ST7789",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "Adafruit-Blinka",
"specs": []
},
{
"name": "adafruit-blinka-displayio",
"specs": []
}
],
"lcname": "adafruit-circuitpython-st7789"
}