adafruit-circuitpython-tfmini


Nameadafruit-circuitpython-tfmini JSON
Version 1.2.18 PyPI version JSON
download
home_page
SummaryA CircuitPython/Python library for Benewake`s TF mini distance sensor
upload_time2023-12-09 17:35:30
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords adafruit tfmini benewake distance sensor hardware micropython circuitpython
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-tfmini/badge/?version=latest
    :target: https://docs.circuitpython.org/projects/tfmini/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_TFmini/workflows/Build%CI/badge.svg
    :target: https://github.com/adafruit/Adafruit_CircuitPython_TFmini/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

A CircuitPython/Python library for Benewake's TF mini distance sensor

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

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-tfmini/>`_. To install for current user:

.. code-block:: shell

    pip3 install adafruit-circuitpython-tfmini

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

.. code-block:: shell

    sudo pip3 install adafruit-circuitpython-tfmini

To install in a virtual environment in your current project:

.. code-block:: shell

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

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

.. code-block:: python

	import time
	import board  # comment this out if using pyserial
	import busio  # comment this out if using pyserial
	import adafruit_tfmini

	# Use hardware uart
	uart = busio.UART(board.TX, board.RX)

	# Or, you can use pyserial on any computer
	#import serial
	#uart = serial.Serial("/dev/ttyS2", timeout=1)

	# Simplest use, connect with the uart bus object
	tfmini = adafruit_tfmini.TFmini(uart)

	# You can put in 'short' or 'long' distance mode
	tfmini.mode = adafruit_tfmini.MODE_SHORT
	print("Now in mode", tfmini.mode)

	while True:
	    print("Distance: %d cm (strength %d, mode %x)" %
		  (tfmini.distance, tfmini.strength, tfmini.mode))
	    time.sleep(0.1)


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

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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "adafruit-circuitpython-tfmini",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "adafruit,tfmini,benewake,distance,sensor,hardware,micropython,circuitpython",
    "author": "",
    "author_email": "Adafruit Industries <circuitpython@adafruit.com>",
    "download_url": "https://files.pythonhosted.org/packages/aa/b0/d253cf1aad811a43e35f40590dd2ac5c35099d8b29e0ac5c0c811a612a2b/adafruit-circuitpython-tfmini-1.2.18.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-tfmini/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/tfmini/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_TFmini/workflows/Build%CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_TFmini/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\nA CircuitPython/Python library for Benewake's TF mini distance sensor\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\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-tfmini/>`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-tfmini\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-tfmini\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 .venv/bin/activate\n    pip3 install adafruit-circuitpython-tfmini\n\nUsage Example\n=============\n\n.. code-block:: python\n\n\timport time\n\timport board  # comment this out if using pyserial\n\timport busio  # comment this out if using pyserial\n\timport adafruit_tfmini\n\n\t# Use hardware uart\n\tuart = busio.UART(board.TX, board.RX)\n\n\t# Or, you can use pyserial on any computer\n\t#import serial\n\t#uart = serial.Serial(\"/dev/ttyS2\", timeout=1)\n\n\t# Simplest use, connect with the uart bus object\n\ttfmini = adafruit_tfmini.TFmini(uart)\n\n\t# You can put in 'short' or 'long' distance mode\n\ttfmini.mode = adafruit_tfmini.MODE_SHORT\n\tprint(\"Now in mode\", tfmini.mode)\n\n\twhile True:\n\t    print(\"Distance: %d cm (strength %d, mode %x)\" %\n\t\t  (tfmini.distance, tfmini.strength, tfmini.mode))\n\t    time.sleep(0.1)\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/tfmini/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_TFmini/blob/main/CODE_OF_CONDUCT.md>`_\nbefore contributing to help this project stay welcoming.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A CircuitPython/Python library for Benewake`s TF mini distance sensor",
    "version": "1.2.18",
    "project_urls": {
        "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_TFmini"
    },
    "split_keywords": [
        "adafruit",
        "tfmini",
        "benewake",
        "distance",
        "sensor",
        "hardware",
        "micropython",
        "circuitpython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "869841e29f424287ff094d0ffee73d87a575613e844c834e7d745caa8615605c",
                "md5": "521401bd2cfbaa94834660fb482d0585",
                "sha256": "86cd52834b1bccd052975677b42e3764f4e50d4491b3b857e8021d879acd97f9"
            },
            "downloads": -1,
            "filename": "adafruit_circuitpython_tfmini-1.2.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "521401bd2cfbaa94834660fb482d0585",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5433,
            "upload_time": "2023-12-09T17:35:29",
            "upload_time_iso_8601": "2023-12-09T17:35:29.892236Z",
            "url": "https://files.pythonhosted.org/packages/86/98/41e29f424287ff094d0ffee73d87a575613e844c834e7d745caa8615605c/adafruit_circuitpython_tfmini-1.2.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aab0d253cf1aad811a43e35f40590dd2ac5c35099d8b29e0ac5c0c811a612a2b",
                "md5": "31e2108de05129759348fa6299b4f24f",
                "sha256": "088c87d9635168d8d36ce7c264fd9a4c4c7a1e4c1742f59fc28ec969f887bf1e"
            },
            "downloads": -1,
            "filename": "adafruit-circuitpython-tfmini-1.2.18.tar.gz",
            "has_sig": false,
            "md5_digest": "31e2108de05129759348fa6299b4f24f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 26451,
            "upload_time": "2023-12-09T17:35:30",
            "upload_time_iso_8601": "2023-12-09T17:35:30.920946Z",
            "url": "https://files.pythonhosted.org/packages/aa/b0/d253cf1aad811a43e35f40590dd2ac5c35099d8b29e0ac5c0c811a612a2b/adafruit-circuitpython-tfmini-1.2.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 17:35:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adafruit",
    "github_project": "Adafruit_CircuitPython_TFmini",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "adafruit-circuitpython-tfmini"
}
        
Elapsed time: 0.15601s