{ "info": { "author": "Adafruit Industries", "author_email": "circuitpython@adafruit.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries", "Topic :: System :: Hardware" ], "description": "Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-tfmini/badge/?version=latest\n :target: https://circuitpython.readthedocs.io/projects/tfmini/en/latest/\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/discord/327254708534116352.svg\n :target: https://discord.gg/nBQh6qu\n :alt: Discord\n\n.. image:: https://travis-ci.com/adafruit/Adafruit_CircuitPython_TFmini.svg?branch=master\n :target: https://travis-ci.com/adafruit/Adafruit_CircuitPython_TFmini\n :alt: Build Status\n\nA CircuitPython/Python library for Benewake's TF mini distance sensor\n\nDependencies\n=============\nThis driver depends on:\n\n* `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 `_.\n\nInstalling from PyPI\n--------------------\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI `_. 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 .env\n source .env/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\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n`_\nbefore contributing to help this project stay welcoming.\n\nBuilding locally\n================\n\nZip release files\n-----------------\n\nTo build this library locally you'll need to install the\n`circuitpython-build-tools `_ package.\n\n.. code-block:: shell\n\n python3 -m venv .env\n source .env/bin/activate\n pip install circuitpython-build-tools\n\nOnce installed, make sure you are in the virtual environment:\n\n.. code-block:: shell\n\n source .env/bin/activate\n\nThen run the build:\n\n.. code-block:: shell\n\n circuitpython-build-bundles --filename_prefix adafruit-circuitpython-tfmini --library_location .\n\nSphinx documentation\n-----------------------\n\nSphinx is used to build the documentation based on rST files and comments in the code. First,\ninstall dependencies (feel free to reuse the virtual environment from above):\n\n.. code-block:: shell\n\n python3 -m venv .env\n source .env/bin/activate\n pip install Sphinx sphinx-rtd-theme\n\nNow, once you have the virtual environment activated:\n\n.. code-block:: shell\n\n cd docs\n sphinx-build -E -W -b html . _build/html\n\nThis will output the documentation to ``docs/_build/html``. Open the index.html in your browser to\nview them. It will also (due to -W) error out on any warning like Travis will. This is a good way to\nlocally verify it will pass.", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adafruit/Adafruit_CircuitPython_TFmini", "keywords": "adafruit tfmini benewake distance sensor hardware micropython circuitpython", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "adafruit-circuitpython-tfmini", "package_url": "https://pypi.org/project/adafruit-circuitpython-tfmini/", "platform": "", "project_url": "https://pypi.org/project/adafruit-circuitpython-tfmini/", "project_urls": { "Homepage": "https://github.com/adafruit/Adafruit_CircuitPython_TFmini" }, "release_url": "https://pypi.org/project/adafruit-circuitpython-tfmini/1.1.1/", "requires_dist": null, "requires_python": "", "summary": "A CircuitPython/Python library for Benewake`s TF mini distance sensor", "version": "1.1.1" }, "last_serial": 4701019, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "dcce15836fe33b45277a885695c95850", "sha256": "a69dd94de075904101aaff8f2258049d193389d4a8dd46463dbbe48927016224" }, "downloads": -1, "filename": "adafruit-circuitpython-tfmini-1.1.0.tar.gz", "has_sig": false, "md5_digest": "dcce15836fe33b45277a885695c95850", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20820, "upload_time": "2018-11-08T23:36:59", "url": "https://files.pythonhosted.org/packages/f9/44/2349f79b2b353fea01d78be82ac95dda16ae8055044e4049b6e94cd0e455/adafruit-circuitpython-tfmini-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "459eecb5938d6950391e40de7e0a7849", "sha256": "4674f266a58a4a9cb7a40e04eeb2fb9158d801d38c195b2840ed1146939528a4" }, "downloads": -1, "filename": "adafruit-circuitpython-tfmini-1.1.1.tar.gz", "has_sig": false, "md5_digest": "459eecb5938d6950391e40de7e0a7849", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19869, "upload_time": "2019-01-16T00:23:26", "url": "https://files.pythonhosted.org/packages/2e/0f/22b7957025b3759e2d282ebfec2e49fe1f264b4fc8189a20746851a42c23/adafruit-circuitpython-tfmini-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "459eecb5938d6950391e40de7e0a7849", "sha256": "4674f266a58a4a9cb7a40e04eeb2fb9158d801d38c195b2840ed1146939528a4" }, "downloads": -1, "filename": "adafruit-circuitpython-tfmini-1.1.1.tar.gz", "has_sig": false, "md5_digest": "459eecb5938d6950391e40de7e0a7849", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19869, "upload_time": "2019-01-16T00:23:26", "url": "https://files.pythonhosted.org/packages/2e/0f/22b7957025b3759e2d282ebfec2e49fe1f264b4fc8189a20746851a42c23/adafruit-circuitpython-tfmini-1.1.1.tar.gz" } ] }