adafruit-circuitpython-st7789


Nameadafruit-circuitpython-st7789 JSON
Version 1.6.1 PyPI version JSON
download
home_page
Summarydisplayio driver for ST7789 TFT-LCD displays.
upload_time2023-12-09 17:35:04
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit blinka circuitpython micropython st7789 display tft lcd displayio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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": "",
    "name": "adafruit-circuitpython-st7789",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,blinka,circuitpython,micropython,st7789,display,tft,lcd,displayio",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/9e/4a/6774ccba9fc60cfc392040282252eb149105d88c170f9eaab0dc5089eb52/adafruit-circuitpython-st7789-1.6.1.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.1",
    "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": "75a6245f91e6d757af242c5d3aa051c83dcf43c84c984678df59f336b34a6ee6",
                "md5": "0360fb557843b68fabb886fd00f69fdc",
                "sha256": "ba04e474eab6dd2080cfcd5791e4225072118c96c200200a529a925c0fc26c39"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_st7789-1.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0360fb557843b68fabb886fd00f69fdc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4562,
            "upload_time": "2023-12-09T17:35:02",
            "upload_time_iso_8601": "2023-12-09T17:35:02.739629Z",
            "url": "https://files.pythonhosted.org/packages/75/a6/245f91e6d757af242c5d3aa051c83dcf43c84c984678df59f336b34a6ee6/adafruit_circuitpython_st7789-1.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9e4a6774ccba9fc60cfc392040282252eb149105d88c170f9eaab0dc5089eb52",
                "md5": "d1dafb8d1c68f9e4b352270daee5c380",
                "sha256": "0a48089611dd64f76ceae162b1da91f7ca008962d6b50e1bc8790ab5e69c1382"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-st7789-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d1dafb8d1c68f9e4b352270daee5c380",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 28066,
            "upload_time": "2023-12-09T17:35:04",
            "upload_time_iso_8601": "2023-12-09T17:35:04.383546Z",
            "url": "https://files.pythonhosted.org/packages/9e/4a/6774ccba9fc60cfc392040282252eb149105d88c170f9eaab0dc5089eb52/adafruit-circuitpython-st7789-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 17:35:04",
    "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": [],
    "lcname": "adafruit-circuitpython-st7789"
}
        
Elapsed time: 0.14978s