adafruit-circuitpython-ek79686


Nameadafruit-circuitpython-ek79686 JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryCircuitPython `displayio` driver for EK79686-based ePaper displays
upload_time2024-04-01 14:50:57
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords adafruit blinka circuitpython micropython ek79686 displayio epd epaper
VCS
bugtrack_url
requirements Adafruit-Blinka
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============


.. image:: https://readthedocs.org/projects/adafruit-circuitpython-ek79686/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/ek79686/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_EK79686/workflows/Build%20CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_EK79686/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

CircuitPython `displayio` driver for EK79686-based ePaper 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://circuitpython.org/libraries>`_
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.


Installing from PyPI
=====================

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-ek79686/>`_.
To install for current user:

.. code-block:: shell

    pip3 install adafruit-circuitpython-ek79686

To install system-wide (this may be required in some cases):

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-ek79686

To install in a virtual environment in your current project:

.. code-block:: shell

    mkdir project-name && cd project-name
    python3 -m venv .venv
    source .env/bin/activate
    pip3 install adafruit-circuitpython-ek79686

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:

.. code-block:: shell

    pip3 install circup

With ``circup`` installed and your CircuitPython device connected use the
following command to install:

.. code-block:: shell

    circup install adafruit_ek79686

Or the following command to update an existing version:

.. code-block:: shell

    circup update

Usage Example
=============

.. code-block:: python

    import time
    import board
    import displayio
    import adafruit_ek79686

    # Used to ensure the display is free in CircuitPython
    displayio.release_displays()

    # Define the pins needed for display use on the Metro
    spi = board.SPI()
    epd_cs = board.D10
    epd_dc = board.D9
    epd_reset = board.D5
    epd_busy = board.D6

    # Create the displayio connection to the display pins
    display_bus = displayio.FourWire(
        spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
    )
    time.sleep(1)  # Wait a bit

    # Create the display object - the third color is red (0xff0000)
    display = adafruit_ek79686.EK79686(
        display_bus,
        width=264,
        height=176,
        busy_pin=epd_busy,
        highlight_color=0xFF0000,
        rotation=90,
    )

    # Create a display group for our screen objects
    g = displayio.Group()


    # Display a ruler graphic from the root directory of the CIRCUITPY drive
    with open("/display-ruler.bmp", "rb") as f:
        pic = displayio.OnDiskBitmap(f)
        # Create a Tilegrid with the bitmap and put in the displayio group
        # CircuitPython 6 & 7 compatible
        t = displayio.TileGrid(
            pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
        )
        # CircuitPython 7 compatible only
        # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
        g.append(t)

        # Place the display group on the screen (does not refresh)
        display.show(g)

        # Show the image on the display
        display.refresh()

        print("refreshed")

        # Do Not refresh the screen more often than every 180 seconds
        #   for eInk displays! Rapid refreshes will damage the panel.
        time.sleep(180)


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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "adafruit-circuitpython-ek79686",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "adafruit, blinka, circuitpython, micropython, ek79686, displayio, epd, epaper",
    "author": null,
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/ca/12/ce0f779b4ca275f27c65eb0be48977059949a48bc94a133c47f056c942ed/adafruit-circuitpython-ek79686-1.1.0.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-ek79686/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/ek79686/en/latest/\n    :alt: Documentation Status\n\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\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_EK79686/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_EK79686/actions\n    :alt: Build Status\n\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\nCircuitPython `displayio` driver for EK79686-based ePaper 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://circuitpython.org/libraries>`_\nor individual libraries can be installed using\n`circup <https://github.com/adafruit/circup>`_.\n\n\nInstalling from PyPI\n=====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI <https://pypi.org/project/adafruit-circuitpython-ek79686/>`_.\nTo install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-ek79686\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-ek79686\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name && cd project-name\n    python3 -m venv .venv\n    source .env/bin/activate\n    pip3 install adafruit-circuitpython-ek79686\n\nInstalling to a Connected CircuitPython Device with Circup\n==========================================================\n\nMake sure that you have ``circup`` installed in your Python environment.\nInstall it with the following command if necessary:\n\n.. code-block:: shell\n\n    pip3 install circup\n\nWith ``circup`` installed and your CircuitPython device connected use the\nfollowing command to install:\n\n.. code-block:: shell\n\n    circup install adafruit_ek79686\n\nOr the following command to update an existing version:\n\n.. code-block:: shell\n\n    circup update\n\nUsage Example\n=============\n\n.. code-block:: python\n\n    import time\n    import board\n    import displayio\n    import adafruit_ek79686\n\n    # Used to ensure the display is free in CircuitPython\n    displayio.release_displays()\n\n    # Define the pins needed for display use on the Metro\n    spi = board.SPI()\n    epd_cs = board.D10\n    epd_dc = board.D9\n    epd_reset = board.D5\n    epd_busy = board.D6\n\n    # Create the displayio connection to the display pins\n    display_bus = displayio.FourWire(\n        spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000\n    )\n    time.sleep(1)  # Wait a bit\n\n    # Create the display object - the third color is red (0xff0000)\n    display = adafruit_ek79686.EK79686(\n        display_bus,\n        width=264,\n        height=176,\n        busy_pin=epd_busy,\n        highlight_color=0xFF0000,\n        rotation=90,\n    )\n\n    # Create a display group for our screen objects\n    g = displayio.Group()\n\n\n    # Display a ruler graphic from the root directory of the CIRCUITPY drive\n    with open(\"/display-ruler.bmp\", \"rb\") as f:\n        pic = displayio.OnDiskBitmap(f)\n        # Create a Tilegrid with the bitmap and put in the displayio group\n        # CircuitPython 6 & 7 compatible\n        t = displayio.TileGrid(\n            pic, pixel_shader=getattr(pic, \"pixel_shader\", displayio.ColorConverter())\n        )\n        # CircuitPython 7 compatible only\n        # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)\n        g.append(t)\n\n        # Place the display group on the screen (does not refresh)\n        display.show(g)\n\n        # Show the image on the display\n        display.refresh()\n\n        print(\"refreshed\")\n\n        # Do Not refresh the screen more often than every 180 seconds\n        #   for eInk displays! Rapid refreshes will damage the panel.\n        time.sleep(180)\n\n\nDocumentation\n=============\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/ek79686/en/latest/>`_.\n\nFor information on building library documentation, please check out\n`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_EK79686/blob/HEAD/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CircuitPython `displayio` driver for EK79686-based ePaper displays",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_EK79686"
    },
    "split_keywords": [
        "adafruit",
        " blinka",
        " circuitpython",
        " micropython",
        " ek79686",
        " displayio",
        " epd",
        " epaper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a75fe620e546f58386f9a680cc7d3920d56d21e2ee35e2affb1399a84f5b391d",
                "md5": "62010d60b3ae2cc2eb2c29008796c163",
                "sha256": "8bfa4b02cd9d5f90f70a228fb594f3c81a23a42e53fc4e0b66b18dd22b71b483"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_ek79686-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "62010d60b3ae2cc2eb2c29008796c163",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5409,
            "upload_time": "2024-04-01T14:50:56",
            "upload_time_iso_8601": "2024-04-01T14:50:56.361995Z",
            "url": "https://files.pythonhosted.org/packages/a7/5f/e620e546f58386f9a680cc7d3920d56d21e2ee35e2affb1399a84f5b391d/adafruit_circuitpython_ek79686-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca12ce0f779b4ca275f27c65eb0be48977059949a48bc94a133c47f056c942ed",
                "md5": "597d8e45e77d50abc64fee16229d5c24",
                "sha256": "a6e5404bbae73d8f300bbc691df588ea9c3b4023fb8baeacd1fcbd0aa2d3e57b"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-ek79686-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "597d8e45e77d50abc64fee16229d5c24",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 32695,
            "upload_time": "2024-04-01T14:50:57",
            "upload_time_iso_8601": "2024-04-01T14:50:57.917187Z",
            "url": "https://files.pythonhosted.org/packages/ca/12/ce0f779b4ca275f27c65eb0be48977059949a48bc94a133c47f056c942ed/adafruit-circuitpython-ek79686-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-01 14:50:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_EK79686",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Adafruit-Blinka",
            "specs": []
        }
    ],
    "lcname": "adafruit-circuitpython-ek79686"
}
        
Elapsed time: 0.26537s