{ "info": { "author": "Max Hofbauer", "author_email": "maxhofb@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "\n# TSL2591 Python Library\n\n[![GitHub stars](https://img.shields.io/github/stars/kyletaylored/python-tsl2591.svg)](https://github.com/kyletaylored/python-tsl2591/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/kyletaylored/python-tsl2591.svg)](https://github.com/kyletaylored/python-tsl2591/network)\n[![GitHub issues](https://img.shields.io/github/issues/kyletaylored/python-tsl2591.svg)](https://github.com/kyletaylored/python-tsl2591/issues)\n[![Inspired by Adafruit](https://img.shields.io/badge/Inspired%20by-adafruit-blue.svg)](https://gitgud.io/adafruit/Adafruit_TSL2591_Library)\n[![Build Status](https://travis-ci.org/kyletaylored/python-tsl2591.svg?branch=master)](https://travis-ci.org/kyletaylored/python-tsl2591)\n\nThis is a simple python library for the Adafruit TSL2591 breakout board based on the [Arduino library](https://github.com/adafruit/Adafruit_TSL2591_Library) from Adafruit. It was developed to work on a Raspberry PI.\n\n## Requirements\nTo use this library, you must have the following:\n1. TSL2591 sensor (__not__ the [TSL25**61**](https://www.adafruit.com/product/439))\n2. I2C enabled device\n3. Python 3 (though Python 2 should technically still work)\n\n## Installation\n\nThis module can be installed using pip (and can find a copy of this module on [PyPi](https://pypi.org/project/python-tsl2591/)).\n\n```bash\npip install python-tsl2591\n```\n\n### Quickstart\nThis library comes with an example file you can use, or you can copy and paste the following:\n\n```python\nfrom python_tsl2591 import tsl2591\nimport time\n\nif __name__ == '__main__':\n\n tsl = tsl2591() # initialize\n # full, ir = tsl.get_full_luminosity() # Read raw values (full spectrum and infared spectrum).\n # lux = tsl.calculate_lux(full, ir) # Convert raw values to Lux.\n\n while True:\n print(tsl.get_current()) # Return object with all values.\n # print (lux, full, ir)\n time.sleep(2)\n```\n\n### Install from Source\n\nYou can also install this Python module from source:\n\n```bash\ngit clone https://github.com/kyletaylored/python-tsl2591\ncd python-tsl2591\npython setup.py install\n```\n\n## Enabling I2C on your Raspberry Pi\n\nYou can enable I2C on the Raspberry Pi by following the instructions on [Adafruit](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c).\n\nThe quick version is:\n\n1. Run `sudo raspi-config`\n2. Select `Advanced Options`\n3. Enable I2C\n4. Reboot (`sudo reboot`)\n\nWhen testing I2C (`sudo i2cdetect -y 1`), you should see at least one connected device, your TSL2591 at `0x29`. For more information, see the [FAQ](#i2c-check-for-static-address).\n\n## FAQ\n\n### Fatal error (deprecated)\n\n**UPDATE**: We have integrated the `smbus2` library, which is an smbus library built in Python, and does not require any system packages like `smbus-cffi` or `libffi-dev`.\n\nIf you do not have those Raspbian packages installed prior to installing this library, you will run into errors that look similar to this.\n\n```\nfatal error: ffi.h: No such file or directory\n #include \n ^\ncompilation terminated.\nerror: command 'arm-linux-gnueabihf-gcc' failed with exit status 1\n```\n\n### I2C Check for Static Address\n\nBecause the TSL2591 connects via I2C, it's always good to run the I2C detection to verify the address is being read. Unlike the TSL2561 with programmable addresses, the TSL2591's address is hard coded and cannot be changed - thus it will always show `0x29`.\n\nIn the example output below, you can see there are two I2C devices detected, one being the TSL2591.\n\n```bash\npi@raspberrypi:~ $ sudo i2cdetect -y 1\n 0 1 2 3 4 5 6 7 8 9 a b c d e f\n00: -- -- -- -- -- -- -- -- -- -- -- -- --\n10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --\n30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --\n40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n70: -- -- -- -- -- -- -- --\n```\n\n## License\n\nPython files in this repository are released under the [MIT license](LICENSE.md).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/kyletaylored/python-tsl2591", "keywords": "python_tsl2591,tsl2591,light sensor,adafruit", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "python-tsl2591", "package_url": "https://pypi.org/project/python-tsl2591/", "platform": "", "project_url": "https://pypi.org/project/python-tsl2591/", "project_urls": { "Homepage": "http://github.com/kyletaylored/python-tsl2591" }, "release_url": "https://pypi.org/project/python-tsl2591/0.2.0/", "requires_dist": [ "smbus2 (>=0.2)" ], "requires_python": "", "summary": "Community-coded Python module for TSL2591 sensor converted from Adafruit's TSL2591 library. Use at your own risk.", "version": "0.2.0" }, "last_serial": 5364886, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "a61b07bea147baefd403fc000644a14c", "sha256": "1b64b23aecda93bcfc59650bedfaf3f4fd982abbd7eeeb806d54ebc5a2370336" }, "downloads": -1, "filename": "python_tsl2591-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a61b07bea147baefd403fc000644a14c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6567, "upload_time": "2019-06-05T14:36:18", "url": "https://files.pythonhosted.org/packages/c8/88/570faf5769794401467e498b4ee64e0bd1b50da612af8090c8f723f69ccc/python_tsl2591-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "582b6dcb24c6fc7a14fa955b8123775c", "sha256": "e2e87361e9259077775f97966e7d04ed03411e6bca457cfb1fe1bec3d1303d30" }, "downloads": -1, "filename": "python-tsl2591-0.1.5.tar.gz", "has_sig": false, "md5_digest": "582b6dcb24c6fc7a14fa955b8123775c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11722, "upload_time": "2019-06-05T14:36:20", "url": "https://files.pythonhosted.org/packages/e3/8f/d491d16689a9103a2f6aa0dcebe9cd9db1a6019f23b320931a5c6f10aedc/python-tsl2591-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "108bfe95cd3c9e632291d4e318bc3aba", "sha256": "cfef9937b14a2d08d59451bf3056959b3e971a436cfb5c4105280c5b2d37d26f" }, "downloads": -1, "filename": "python_tsl2591-0.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "108bfe95cd3c9e632291d4e318bc3aba", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6570, "upload_time": "2019-06-05T14:49:55", "url": "https://files.pythonhosted.org/packages/f6/00/9f719727dceb0aeb8118302b224850f0689a743f5ef20199fd355c0fe678/python_tsl2591-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09a07ab4d73f96529dcf14e2ad40bda8", "sha256": "77aaf47643bdccb1acdde3db55ab1ad9db6b80ff74b84d4efdfcd3cc3401351a" }, "downloads": -1, "filename": "python-tsl2591-0.1.6.tar.gz", "has_sig": false, "md5_digest": "09a07ab4d73f96529dcf14e2ad40bda8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11723, "upload_time": "2019-06-05T14:49:57", "url": "https://files.pythonhosted.org/packages/b2/e9/0f6c853b0980ac3803567972ac6e1b73be0d3fc222ece39649d62a440cbb/python-tsl2591-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "a2747d257ba6844d1c521adabed048ce", "sha256": "6365d8e74ee22a32b9d6a531a122bb69ab661748b27cc0d5ee9a5fc2aa23c516" }, "downloads": -1, "filename": "python_tsl2591-0.1.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a2747d257ba6844d1c521adabed048ce", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6317, "upload_time": "2019-06-05T15:00:11", "url": "https://files.pythonhosted.org/packages/bb/16/101dbc7afc58b55b0cb398dd37935c3fecfb4ff380431ec59f002dfc1455/python_tsl2591-0.1.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7951f22bd6045f7fa2fa6d9fc10cf54f", "sha256": "6e76025a38b9d0584a224c58be155751913fa242eee2ed77728282f7aad0c8a4" }, "downloads": -1, "filename": "python-tsl2591-0.1.7.tar.gz", "has_sig": false, "md5_digest": "7951f22bd6045f7fa2fa6d9fc10cf54f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11668, "upload_time": "2019-06-05T15:00:13", "url": "https://files.pythonhosted.org/packages/0b/4f/81f13577196da26a86184801e36f097f6be98d0b4f18831914520caf436e/python-tsl2591-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "35118253fa11045fcf8c68c4af9e2ea5", "sha256": "87d0529f8c34d8e871a509e9bea34d9cd8308b3b4f031898d5b5e1ead2ec3266" }, "downloads": -1, "filename": "python_tsl2591-0.1.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "35118253fa11045fcf8c68c4af9e2ea5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6584, "upload_time": "2019-06-05T16:18:31", "url": "https://files.pythonhosted.org/packages/b2/3c/be53cbce24b2e3096b114f2ac14665d132a92fbcf21cdbcffa75073073e2/python_tsl2591-0.1.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88c76980786195e2b9888f3f1026783e", "sha256": "bf55d5346042f9e17f064d14397890b2ab890ddaf22130074b52bb87ad167017" }, "downloads": -1, "filename": "python-tsl2591-0.1.8.tar.gz", "has_sig": false, "md5_digest": "88c76980786195e2b9888f3f1026783e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11745, "upload_time": "2019-06-05T16:18:32", "url": "https://files.pythonhosted.org/packages/52/39/1467896f621716ebee76a87aa577124a0283eb6e00827f2ecf99018c28fb/python-tsl2591-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "fb4103436cdaf6783ee51c13cc576d61", "sha256": "247a5ba79520f2a43a59869ca3f332cec535ac0d97679026ffbd6d6a9be9065f" }, "downloads": -1, "filename": "python_tsl2591-0.1.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fb4103436cdaf6783ee51c13cc576d61", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6585, "upload_time": "2019-06-05T16:31:11", "url": "https://files.pythonhosted.org/packages/2b/9f/2efbbe40e87d997650514ae8d5face50eb8b2873ba83f10de2d3e9ff6abb/python_tsl2591-0.1.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd5da70b8c597b2f11d55eadebb367b8", "sha256": "327875a9fa7b350bd2e51b09261f1cb8b008940ed831e72df1fc0862b31dae5e" }, "downloads": -1, "filename": "python-tsl2591-0.1.9.tar.gz", "has_sig": false, "md5_digest": "dd5da70b8c597b2f11d55eadebb367b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11746, "upload_time": "2019-06-05T16:31:12", "url": "https://files.pythonhosted.org/packages/ff/17/50fd37ded622dd5f0877edc78829124f3b8b08c383d3dbdb415b34a8845a/python-tsl2591-0.1.9.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e9ed2b17f7fb650765bcab89e03b5ed7", "sha256": "4568864c7ff7497b2a4418f9113c7dafd9d56239f8795f7bf523945173364ca6" }, "downloads": -1, "filename": "python_tsl2591-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e9ed2b17f7fb650765bcab89e03b5ed7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6865, "upload_time": "2019-06-06T00:38:23", "url": "https://files.pythonhosted.org/packages/69/8c/165e5103f7374d9aa2604cddc1ae62381c5ec74ed9494f5320f0a6b4fc4e/python_tsl2591-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb278deac2f6b0e977bc13c744df8b7f", "sha256": "e4d8c2843b6b78451e31550472a06325a2d6a1b5ba7ee3574849ca5dbc7095fa" }, "downloads": -1, "filename": "python-tsl2591-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fb278deac2f6b0e977bc13c744df8b7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12115, "upload_time": "2019-06-06T00:38:40", "url": "https://files.pythonhosted.org/packages/3c/48/173a383806fbf3bcec97868b84c3afc040f47f44090f0a25aa82874561a1/python-tsl2591-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9ed2b17f7fb650765bcab89e03b5ed7", "sha256": "4568864c7ff7497b2a4418f9113c7dafd9d56239f8795f7bf523945173364ca6" }, "downloads": -1, "filename": "python_tsl2591-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e9ed2b17f7fb650765bcab89e03b5ed7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6865, "upload_time": "2019-06-06T00:38:23", "url": "https://files.pythonhosted.org/packages/69/8c/165e5103f7374d9aa2604cddc1ae62381c5ec74ed9494f5320f0a6b4fc4e/python_tsl2591-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fb278deac2f6b0e977bc13c744df8b7f", "sha256": "e4d8c2843b6b78451e31550472a06325a2d6a1b5ba7ee3574849ca5dbc7095fa" }, "downloads": -1, "filename": "python-tsl2591-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fb278deac2f6b0e977bc13c744df8b7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12115, "upload_time": "2019-06-06T00:38:40", "url": "https://files.pythonhosted.org/packages/3c/48/173a383806fbf3bcec97868b84c3afc040f47f44090f0a25aa82874561a1/python-tsl2591-0.2.0.tar.gz" } ] }