circuitpython-cst816


Namecircuitpython-cst816 JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryCircuitPython driver for the CST816 capacitive touch screen IC
upload_time2023-06-10 04:20:43
maintainer
docs_urlNone
authorNeoStormer
requires_python
licenseMIT
keywords adafruit blinka circuitpython micropython cst816 cst816 cst816s cst816t touch display driver
VCS
bugtrack_url
requirements Adafruit-Blinka adafruit-circuitpython-busdevice
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

.. image:: https://img.shields.io/discord/327254708534116352.svg
    :target: https://adafru.it/discord
    :alt: Discord

.. image:: https://github.com/NeoStormer/CircuitPython_CST816/workflows/Build%20CI/badge.svg
    :target: https://github.com/NeoStormer/CircuitPython_CST816/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 driver for the CST816 capacitive touch screen IC

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

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_

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>`_.

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

.. code-block:: python

    import time
    import board
    import busio
    import cst816

    # Initialize I2C
    i2c = busio.I2C(board.GP7,board.GP6)
    touch = cst816.CST816(i2c)

    # Check if the touch controller is detected
    if touch.who_am_i():
        print("CST816 detected.")
    else:
        print("CST816 not detected.")

    # Read touch data continuously
    while True:
        point = touch.get_point()
        gesture = touch.get_gesture()
        press = touch.get_touch()
        distance = touch.get_distance()
        print("Position: {0},{1} - Gesture: {2} - Pressed? {3} - Distance: {4},{5}".format(point.x_point, point.y_point, gesture, press, distance.x_dist, distance.y_dist))
        time.sleep(0.05)

Contributing
============

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/NeoStormer/CircuitPython_CST816/blob/HEAD/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "circuitpython-cst816",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,blinka,circuitpython,micropython,cst816,CST816,,CST816S,,CST816T,,touch,,display,,driver",
    "author": "NeoStormer",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/40/6d/c781fa4b9a20924864bdf6257646b2285db3c53dce6310584a2a462f6b37/circuitpython-cst816-0.1.0.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n    :target: https://adafru.it/discord\n    :alt: Discord\n\n.. image:: https://github.com/NeoStormer/CircuitPython_CST816/workflows/Build%20CI/badge.svg\n    :target: https://github.com/NeoStormer/CircuitPython_CST816/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\nCircuitPython driver for the CST816 capacitive touch screen IC\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_\n* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_\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\nUsage Example\n=============\n\n.. code-block:: python\n\n    import time\n    import board\n    import busio\n    import cst816\n\n    # Initialize I2C\n    i2c = busio.I2C(board.GP7,board.GP6)\n    touch = cst816.CST816(i2c)\n\n    # Check if the touch controller is detected\n    if touch.who_am_i():\n        print(\"CST816 detected.\")\n    else:\n        print(\"CST816 not detected.\")\n\n    # Read touch data continuously\n    while True:\n        point = touch.get_point()\n        gesture = touch.get_gesture()\n        press = touch.get_touch()\n        distance = touch.get_distance()\n        print(\"Position: {0},{1} - Gesture: {2} - Pressed? {3} - Distance: {4},{5}\".format(point.x_point, point.y_point, gesture, press, distance.x_dist, distance.y_dist))\n        time.sleep(0.05)\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n<https://github.com/NeoStormer/CircuitPython_CST816/blob/HEAD/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CircuitPython driver for the CST816 capacitive touch screen IC",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/NeoStormer/CircuitPython_CST816"
    },
    "split_keywords": [
        "adafruit",
        "blinka",
        "circuitpython",
        "micropython",
        "cst816",
        "cst816",
        "",
        "cst816s",
        "",
        "cst816t",
        "",
        "touch",
        "",
        "display",
        "",
        "driver"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc407a3ce693fd3879160dac7b041685292846395e64ecdade0121aaaf8a1c90",
                "md5": "4994fc49cec78452fdec0a8da77bdd38",
                "sha256": "36036242303124a305c4238b0cccced1850073e652116f66115de1abe1ddbb7a"
            },
            "downloads": -1,
            "filename": "circuitpython_cst816-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4994fc49cec78452fdec0a8da77bdd38",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4888,
            "upload_time": "2023-06-10T04:20:41",
            "upload_time_iso_8601": "2023-06-10T04:20:41.329431Z",
            "url": "https://files.pythonhosted.org/packages/dc/40/7a3ce693fd3879160dac7b041685292846395e64ecdade0121aaaf8a1c90/circuitpython_cst816-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "406dc781fa4b9a20924864bdf6257646b2285db3c53dce6310584a2a462f6b37",
                "md5": "45ecbbd6de8c5205becf75a55b3c2cf3",
                "sha256": "e1226f4f920aba46d3b70f2ad6e9693832d57e948b899b10ffa2144843bcf7c2"
            },
            "downloads": -1,
            "filename": "circuitpython-cst816-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "45ecbbd6de8c5205becf75a55b3c2cf3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 20440,
            "upload_time": "2023-06-10T04:20:43",
            "upload_time_iso_8601": "2023-06-10T04:20:43.214898Z",
            "url": "https://files.pythonhosted.org/packages/40/6d/c781fa4b9a20924864bdf6257646b2285db3c53dce6310584a2a462f6b37/circuitpython-cst816-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-10 04:20:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NeoStormer",
    "github_project": "CircuitPython_CST816",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Adafruit-Blinka",
            "specs": []
        },
        {
            "name": "adafruit-circuitpython-busdevice",
            "specs": []
        }
    ],
    "lcname": "circuitpython-cst816"
}
        
Elapsed time: 0.07432s