{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# vl53l1x-python\n\nRevised Python library for the VL53L1X Laser Ranger.\n\n# Installing\n\n```\nsudo pip3 install smbus2\nsudo pip3 install VL53L1X2\n```\n\n# Usage\n\n```python\nimport VL53L1X\n\ntof = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29)\ntof.open() # Initialise the i2c bus and configure the sensor\ntof.start_ranging(1) # Start ranging, 1 = Short Range, 2 = Medium Range, 3 = Long Range\ndistance_in_mm = tof.get_distance() # Grab the range in mm\ntof.stop_ranging() # Stop ranging\n```\n\nSee examples and tests for more advanced usage.\n\n\n0.1.2\n-----\n\n* @josemotta ported it to python 3.6 as part of a homeassistant component.\n\nPlease see basic sample:\n\nfrom homeassistant.const import TEMP_CELSIUS\nfrom homeassistant.helpers.entity import Entity\n\nREQUIREMENTS = ['smbus2==0.2.2', 'VL53L1X2==0.1.2']\n\ndef setup_platform(hass, config, add_devices, discovery_info=None):\n \"\"\"Setup the sensor platform.\"\"\"\n add_devices([TofSensor()])\n\n\nclass TofSensor(Entity):\n \"\"\"Representation of a Sensor.\"\"\"\n\n def __init__(self):\n \"\"\"Initialize the sensor.\"\"\"\n self._state = None\n\n @property\n def name(self):\n \"\"\"Return the name of the sensor.\"\"\"\n return 'VL53L1X'\n\n @property\n def state(self):\n \"\"\"Return the state of the sensor.\"\"\"\n return self._state\n\n @property\n def unit_of_measurement(self):\n \"\"\"Return the unit of measurement.\"\"\"\n return TEMP_CELSIUS\n\n def update(self):\n \"\"\"Fetch new state data for the sensor.\n\n This is the only method that should fetch new data for Home Assistant.\n \"\"\"\n self._state = 23\n\n0.0.3\n-----\n\n* @NagyAttila upgrade focusing on working with more than 1 range sensors, also changed quit a lot to make it bit more robust.\n\n0.0.2\n-----\n\n* Improved search for .so file to pick up arch-specific files.\n\n0.0.1\n-----\n\n* Initial release.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/josemotta/vl53l1x-python", "keywords": "", "license": "", "maintainer": "Phil Howard/Nagy Attila/Jose Motta", "maintainer_email": "phil@pimoroni.com", "name": "VL53L1X2", "package_url": "https://pypi.org/project/VL53L1X2/", "platform": "", "project_url": "https://pypi.org/project/VL53L1X2/", "project_urls": { "Homepage": "https://github.com/josemotta/vl53l1x-python" }, "release_url": "https://pypi.org/project/VL53L1X2/0.1.5/", "requires_dist": [ "smbus2" ], "requires_python": "", "summary": "vl53l1x distance sensor driver for Raspberry Pi", "version": "0.1.5" }, "last_serial": 4881822, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "a34fb06c3e77df883a116666c6db0966", "sha256": "7bc227d0285ae4ae25c62235e17d0d88fc46c67acfe680d807d1aac13f1e4ec1" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp35-cp35m-linux_armv6l.whl", "has_sig": false, "md5_digest": "a34fb06c3e77df883a116666c6db0966", "packagetype": "bdist_wheel", "python_version": "cp35", "requires_python": null, "size": 131253, "upload_time": "2019-02-10T00:19:15", "url": "https://files.pythonhosted.org/packages/3d/b6/f93ea01d421fbd7ed285329c4c77483d5cd1f472c78659120fcb3c382f8f/VL53L1X2-0.1.5-cp35-cp35m-linux_armv6l.whl" }, { "comment_text": "", "digests": { "md5": "650bb7eebbf564e58b62523121a74eee", "sha256": "cc1c814e055feadac64d003f7e3f38306779b27a37939f350096065bdf285d02" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp35-cp35m-linux_armv7l.whl", "has_sig": false, "md5_digest": "650bb7eebbf564e58b62523121a74eee", "packagetype": "bdist_wheel", "python_version": "cp35", "requires_python": null, "size": 131340, "upload_time": "2019-01-21T18:27:13", "url": "https://files.pythonhosted.org/packages/fe/a4/99b6e672da204d51ce34aa4b641d810d774baca9e1aae9178f312e0ede09/VL53L1X2-0.1.5-cp35-cp35m-linux_armv7l.whl" }, { "comment_text": "", "digests": { "md5": "ccb3e73028b10cd23264a25cecaaede6", "sha256": "0057691d54149cfaa32acf38d5a9e998e3cc58fa9af105bbed520773a8160768" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp36-cp36m-linux_armv6l.whl", "has_sig": false, "md5_digest": "ccb3e73028b10cd23264a25cecaaede6", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 118067, "upload_time": "2019-02-10T00:19:18", "url": "https://files.pythonhosted.org/packages/02/3f/f0816c13ed32de49de8b4bd7954252440680e4be9e9768f3dfb8246af5a4/VL53L1X2-0.1.5-cp36-cp36m-linux_armv6l.whl" }, { "comment_text": "", "digests": { "md5": "f17994801de4938b72e40b9ff91d25f2", "sha256": "6fb449c67f3f1920b3ef8c9ae14b47856f86bd04dffd6ed616c66727302a96bd" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp36-cp36m-linux_armv7l.whl", "has_sig": false, "md5_digest": "f17994801de4938b72e40b9ff91d25f2", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 119986, "upload_time": "2019-01-21T18:27:16", "url": "https://files.pythonhosted.org/packages/5e/f4/55016e3dc793482e6afb7d1e935544f1ebe880abba59b9a16bff66413420/VL53L1X2-0.1.5-cp36-cp36m-linux_armv7l.whl" }, { "comment_text": "", "digests": { "md5": "0f738a62e221edcdbe9c7e2ab2a97b98", "sha256": "1376b2686200fdb549ce1f38f5a99e986279926de22211a8dd08d423e4685664" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp37-cp37m-linux_armv6l.whl", "has_sig": false, "md5_digest": "0f738a62e221edcdbe9c7e2ab2a97b98", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": null, "size": 118056, "upload_time": "2019-03-01T01:07:43", "url": "https://files.pythonhosted.org/packages/52/c4/6704c180c1008d0f66beef14c5942ab8165f748b51a665e7ffc9acb2bffe/VL53L1X2-0.1.5-cp37-cp37m-linux_armv6l.whl" }, { "comment_text": "", "digests": { "md5": "a3575f52630863262771c998af9404ba", "sha256": "9b906f7aeec80c4680a175b715ff8781d45ea5ec2fff292a4c3be2d289a1de54" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp37-cp37m-linux_armv7l.whl", "has_sig": false, "md5_digest": "a3575f52630863262771c998af9404ba", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": null, "size": 118055, "upload_time": "2019-02-28T22:58:43", "url": "https://files.pythonhosted.org/packages/cb/97/2be4defa74e0ccc450c0a484f3fc3d308694bced3a14f870d2d1daf66abe/VL53L1X2-0.1.5-cp37-cp37m-linux_armv7l.whl" }, { "comment_text": "", "digests": { "md5": "5810b91be2c819e9386fbb3a86a5cd21", "sha256": "01e0abee2a81742874726bd82001d20c6a282b021250f64f1ce4ab1be507e896" }, "downloads": -1, "filename": "VL53L1X2-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5810b91be2c819e9386fbb3a86a5cd21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 80255, "upload_time": "2019-01-21T18:27:17", "url": "https://files.pythonhosted.org/packages/60/3c/561d51963f74d1cdfb47449850b47461710b5c573ef2029a270f0e3b0caf/VL53L1X2-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a34fb06c3e77df883a116666c6db0966", "sha256": "7bc227d0285ae4ae25c62235e17d0d88fc46c67acfe680d807d1aac13f1e4ec1" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp35-cp35m-linux_armv6l.whl", "has_sig": false, "md5_digest": "a34fb06c3e77df883a116666c6db0966", "packagetype": "bdist_wheel", "python_version": "cp35", "requires_python": null, "size": 131253, "upload_time": "2019-02-10T00:19:15", "url": "https://files.pythonhosted.org/packages/3d/b6/f93ea01d421fbd7ed285329c4c77483d5cd1f472c78659120fcb3c382f8f/VL53L1X2-0.1.5-cp35-cp35m-linux_armv6l.whl" }, { "comment_text": "", "digests": { "md5": "650bb7eebbf564e58b62523121a74eee", "sha256": "cc1c814e055feadac64d003f7e3f38306779b27a37939f350096065bdf285d02" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp35-cp35m-linux_armv7l.whl", "has_sig": false, "md5_digest": "650bb7eebbf564e58b62523121a74eee", "packagetype": "bdist_wheel", "python_version": "cp35", "requires_python": null, "size": 131340, "upload_time": "2019-01-21T18:27:13", "url": "https://files.pythonhosted.org/packages/fe/a4/99b6e672da204d51ce34aa4b641d810d774baca9e1aae9178f312e0ede09/VL53L1X2-0.1.5-cp35-cp35m-linux_armv7l.whl" }, { "comment_text": "", "digests": { "md5": "ccb3e73028b10cd23264a25cecaaede6", "sha256": "0057691d54149cfaa32acf38d5a9e998e3cc58fa9af105bbed520773a8160768" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp36-cp36m-linux_armv6l.whl", "has_sig": false, "md5_digest": "ccb3e73028b10cd23264a25cecaaede6", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 118067, "upload_time": "2019-02-10T00:19:18", "url": "https://files.pythonhosted.org/packages/02/3f/f0816c13ed32de49de8b4bd7954252440680e4be9e9768f3dfb8246af5a4/VL53L1X2-0.1.5-cp36-cp36m-linux_armv6l.whl" }, { "comment_text": "", "digests": { "md5": "f17994801de4938b72e40b9ff91d25f2", "sha256": "6fb449c67f3f1920b3ef8c9ae14b47856f86bd04dffd6ed616c66727302a96bd" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp36-cp36m-linux_armv7l.whl", "has_sig": false, "md5_digest": "f17994801de4938b72e40b9ff91d25f2", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": null, "size": 119986, "upload_time": "2019-01-21T18:27:16", "url": "https://files.pythonhosted.org/packages/5e/f4/55016e3dc793482e6afb7d1e935544f1ebe880abba59b9a16bff66413420/VL53L1X2-0.1.5-cp36-cp36m-linux_armv7l.whl" }, { "comment_text": "", "digests": { "md5": "0f738a62e221edcdbe9c7e2ab2a97b98", "sha256": "1376b2686200fdb549ce1f38f5a99e986279926de22211a8dd08d423e4685664" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp37-cp37m-linux_armv6l.whl", "has_sig": false, "md5_digest": "0f738a62e221edcdbe9c7e2ab2a97b98", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": null, "size": 118056, "upload_time": "2019-03-01T01:07:43", "url": "https://files.pythonhosted.org/packages/52/c4/6704c180c1008d0f66beef14c5942ab8165f748b51a665e7ffc9acb2bffe/VL53L1X2-0.1.5-cp37-cp37m-linux_armv6l.whl" }, { "comment_text": "", "digests": { "md5": "a3575f52630863262771c998af9404ba", "sha256": "9b906f7aeec80c4680a175b715ff8781d45ea5ec2fff292a4c3be2d289a1de54" }, "downloads": -1, "filename": "VL53L1X2-0.1.5-cp37-cp37m-linux_armv7l.whl", "has_sig": false, "md5_digest": "a3575f52630863262771c998af9404ba", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": null, "size": 118055, "upload_time": "2019-02-28T22:58:43", "url": "https://files.pythonhosted.org/packages/cb/97/2be4defa74e0ccc450c0a484f3fc3d308694bced3a14f870d2d1daf66abe/VL53L1X2-0.1.5-cp37-cp37m-linux_armv7l.whl" }, { "comment_text": "", "digests": { "md5": "5810b91be2c819e9386fbb3a86a5cd21", "sha256": "01e0abee2a81742874726bd82001d20c6a282b021250f64f1ce4ab1be507e896" }, "downloads": -1, "filename": "VL53L1X2-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5810b91be2c819e9386fbb3a86a5cd21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 80255, "upload_time": "2019-01-21T18:27:17", "url": "https://files.pythonhosted.org/packages/60/3c/561d51963f74d1cdfb47449850b47461710b5c573ef2029a270f0e3b0caf/VL53L1X2-0.1.5.tar.gz" } ] }