adafruit-circuitpython-ssd1331


Nameadafruit-circuitpython-ssd1331 JSON
Version 1.4.1 PyPI version JSON
download
home_page
Summarydisplayio driver for SSD1331 TFT-LCD displays.
upload_time2023-12-09 17:34:45
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit blinka circuitpython micropython ssd1331 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-ssd1331/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/ssd1331/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_SSD1331/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_SSD1331/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 drivers for SSD1331 Displays


Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <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
    import terminalio
    from adafruit_display_text import label
    from adafruit_ssd1331 import SSD1331

    spi = board.SPI()
    tft_cs = board.D5
    tft_dc = board.D6

    displayio.release_displays()
    display_bus = FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=board.D9)

    display = SSD1331(display_bus, width=96, height=64)

    # Make the display context
    splash = displayio.Group()
    display.root_group = splash

    color_bitmap = displayio.Bitmap(96, 64, 1)
    color_palette = displayio.Palette(1)
    color_palette[0] = 0x00FF00 # Bright Green

    bg_sprite = displayio.TileGrid(color_bitmap,
                                   pixel_shader=color_palette,
                                   x=0, y=0)
    splash.append(bg_sprite)

    # Draw a smaller inner rectangle
    inner_bitmap = displayio.Bitmap(86, 54, 1)
    inner_palette = displayio.Palette(1)
    inner_palette[0] = 0xAA0088 # Purple
    inner_sprite = displayio.TileGrid(inner_bitmap,
                                      pixel_shader=inner_palette,
                                      x=5, y=5)
    splash.append(inner_sprite)

    # Draw a label
    text = "Hello World!"
    text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00, x=12, y=32)
    splash.append(text_area)

    while True:
        pass

Documentation
=============

API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/ssd1331/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_SSD1331/blob/main/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-ssd1331",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,blinka,circuitpython,micropython,ssd1331,display,tft,lcd,displayio",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/b2/09/abd9c483defa542463c301c4f701f05b22630fad0695ed200d9bc3159d7b/adafruit-circuitpython-ssd1331-1.4.1.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-ssd1331/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/ssd1331/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_SSD1331/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_SSD1331/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 drivers for SSD1331 Displays\n\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <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    import terminalio\n    from adafruit_display_text import label\n    from adafruit_ssd1331 import SSD1331\n\n    spi = board.SPI()\n    tft_cs = board.D5\n    tft_dc = board.D6\n\n    displayio.release_displays()\n    display_bus = FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=board.D9)\n\n    display = SSD1331(display_bus, width=96, height=64)\n\n    # Make the display context\n    splash = displayio.Group()\n    display.root_group = splash\n\n    color_bitmap = displayio.Bitmap(96, 64, 1)\n    color_palette = displayio.Palette(1)\n    color_palette[0] = 0x00FF00 # Bright Green\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    # Draw a smaller inner rectangle\n    inner_bitmap = displayio.Bitmap(86, 54, 1)\n    inner_palette = displayio.Palette(1)\n    inner_palette[0] = 0xAA0088 # Purple\n    inner_sprite = displayio.TileGrid(inner_bitmap,\n                                      pixel_shader=inner_palette,\n                                      x=5, y=5)\n    splash.append(inner_sprite)\n\n    # Draw a label\n    text = \"Hello World!\"\n    text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00, x=12, y=32)\n    splash.append(text_area)\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/ssd1331/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_SSD1331/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "displayio driver for SSD1331 TFT-LCD displays.",
    "version": "1.4.1",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_SSD1331"
    },
    "split_keywords": [
        "adafruit",
        "blinka",
        "circuitpython",
        "micropython",
        "ssd1331",
        "display",
        "tft",
        "lcd",
        "displayio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d937c01146adb674aa032979c7b7cafdc3c2e6d3536fdc1f0db830e1dad37811",
                "md5": "9259bc36704c2ba00f3c236b245bd9b8",
                "sha256": "41687eaf6fb9f05656b626f46862956acb7ebd03de397dcec9e725aaeb43046f"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_ssd1331-1.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9259bc36704c2ba00f3c236b245bd9b8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4795,
            "upload_time": "2023-12-09T17:34:42",
            "upload_time_iso_8601": "2023-12-09T17:34:42.419401Z",
            "url": "https://files.pythonhosted.org/packages/d9/37/c01146adb674aa032979c7b7cafdc3c2e6d3536fdc1f0db830e1dad37811/adafruit_circuitpython_ssd1331-1.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b209abd9c483defa542463c301c4f701f05b22630fad0695ed200d9bc3159d7b",
                "md5": "dc344847b0016e0cf52fa49c1f2be824",
                "sha256": "b218371c7e3aa4c2d898058780e45c096e5985acc4c59b423f47f07040ca44f5"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-ssd1331-1.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "dc344847b0016e0cf52fa49c1f2be824",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26153,
            "upload_time": "2023-12-09T17:34:45",
            "upload_time_iso_8601": "2023-12-09T17:34:45.280600Z",
            "url": "https://files.pythonhosted.org/packages/b2/09/abd9c483defa542463c301c4f701f05b22630fad0695ed200d9bc3159d7b/adafruit-circuitpython-ssd1331-1.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 17:34:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_SSD1331",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "adafruit-circuitpython-ssd1331"
}
        
Elapsed time: 0.18524s