{ "info": { "author": "Davide Depau", "author_email": "apps@davideddu.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator" ], "description": "# Python bindings for APDS-9930\nPython module for the APDS-9930 I2C Ambient Light and Proximity sensor\n\nThis is a Python port of the [AVR APDS-9930 library](https://github.com/Davideddu/APDS9930).\n\nSimple and easy to use. Makes heavy use of Python-specific programming concepts, such as properties, to make usage even easier. Depends on `python-smbus`, the I2C library for Python.\n\nI tested this on Linux a desktop computer, using the I2C pins of a nVidia graphics card, using the Nouveau graphics driver. This has been reported to work for both ATI and nVidia cards, but not for integrated Intel (and I can confirm this).\n\nCheck the pinout:\n\n![Graphics-I2C pinout](http://members.dslextreme.com/users/paintyourdragon/img/i2c/port-vga.png)\n\n* Grey: ground\n* Red: +5V\n* Yellow: clock\n* Blue: serial data\n\nYou may want to read [this article](http://www.paintyourdragon.com/?p=43) for more information and more pinouts.\n\nIt should work on Raspberry PI.\n\n## Basic usage\n\n**Note:** more detailed usage and documentation coming soon.\n\nLoad the `i2c-dev` kernel module.\n\n```\nsudo modprobe i2c-dev\n```\n\nInstall `i2c-tools` to get the `i2cdetect` program, useful to scan for I2C devices.\n\n```\nsudo apt-get install i2c-tools\n```\n\nList the I2C buses\n\n```\nsudo i2cdetect -l\n```\n\nConnect the device to the I2C pins, then scan every bus until you find the device. Device should have address 0x39.\n\n```\nsudo i2cdetect -y \n\n# Sample good output\n 0 1 2 3 4 5 6 7 8 9 a b c d e f\n00: -- -- -- -- -- -- -- -- -- -- -- -- -- \n10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- -- \n40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- \n70: -- -- -- -- -- -- -- --\n```\n\nOnce you have found the correct bus, run Python as root and import the module.\n\n```\nsudo python\n\n>>> from apds9930 import APDS9930\n```\n\nOpen the bus\n\n```\n>>> a = APDS9930(bus_number)\n```\n\nThat's it! Use Python's help function to retrieve the documentation (which is yet to be generated).\n\n```\n>>> help(APDS9930)\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://davideddu.org/blog/apds-9930-python-module", "keywords": "i2c bindings sensor hardware linux raspberry raspberrypi", "license": "GPLv2", "maintainer": null, "maintainer_email": null, "name": "python-apds9930", "package_url": "https://pypi.org/project/python-apds9930/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-apds9930/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://davideddu.org/blog/apds-9930-python-module" }, "release_url": "https://pypi.org/project/python-apds9930/0.1/", "requires_dist": null, "requires_python": null, "summary": "Python bindings for the Avago APDS-9930 I2C Ambient Light and proximity sensor.", "version": "0.1" }, "last_serial": 3804646, "releases": { "0.1": [] }, "urls": [] }