Python Library – APDS9930
Informatie (ENG):
Python module for the APDS-9930 I2C Ambient Light and Proximity sensor
This is a Python port of the AVR APDS-9930 library.
Simple 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.
Once you have found the correct bus, run Python as root and import the module.
1 2 3 |
sudo python >>> from apds9930 import APDS9930 |
Open the bus
>>> a = APDS9930(bus_number)
Installatie via GIT (github)
1 2 |
cd /usr/src/ sudo git clone https://github.com/Depaulicious/python-apds9930.git |
1 2 3 4 5 6 |
Cloning into 'python-apds9930'... remote: Counting objects: 34, done. remote: Compressing objects: 100% (2/2), done. remote: Total 34 (delta 3), reused 2 (delta 2), pack-reused 30 Unpacking objects: 100% (34/34), done. Checking connectivity... done. |
1 2 |
cd python-apds9930 sudo python setup.py install |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
running install running bdist_egg running egg_info creating python_apds9930.egg-info writing python_apds9930.egg-info/PKG-INFO writing top-level names to python_apds9930.egg-info/top_level.txt writing dependency_links to python_apds9930.egg-info/dependency_links.txt writing manifest file 'python_apds9930.egg-info/SOURCES.txt' reading manifest file 'python_apds9930.egg-info/SOURCES.txt' writing manifest file 'python_apds9930.egg-info/SOURCES.txt' installing library code to build/bdist.linux-armv7l/egg running install_lib running build_py creating build creating build/lib.linux-armv7l-2.7 creating build/lib.linux-armv7l-2.7/apds9930 copying apds9930/__init__.py -> build/lib.linux-armv7l-2.7/apds9930 copying apds9930/values.py -> build/lib.linux-armv7l-2.7/apds9930 creating build/bdist.linux-armv7l creating build/bdist.linux-armv7l/egg creating build/bdist.linux-armv7l/egg/apds9930 copying build/lib.linux-armv7l-2.7/apds9930/__init__.py -> build/bdist.linux-armv7l/egg/apds9930 copying build/lib.linux-armv7l-2.7/apds9930/values.py -> build/bdist.linux-armv7l/egg/apds9930 byte-compiling build/bdist.linux-armv7l/egg/apds9930/__init__.py to __init__.pyc byte-compiling build/bdist.linux-armv7l/egg/apds9930/values.py to values.pyc creating build/bdist.linux-armv7l/egg/EGG-INFO copying python_apds9930.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO copying python_apds9930.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying python_apds9930.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO copying python_apds9930.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/python_apds9930-0.1-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it removing 'build/bdist.linux-armv7l/egg' (and everything under it) Processing python_apds9930-0.1-py2.7.egg Removing /usr/local/lib/python2.7/dist-packages/python_apds9930-0.1-py2.7.egg Copying python_apds9930-0.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages python-apds9930 0.1 is already the active version in easy-install.pth Installed /usr/local/lib/python2.7/dist-packages/python_apds9930-0.1-py2.7.egg Processing dependencies for python-apds9930==0.1 Finished processing dependencies for python-apds9930==0.1 |
Download Python LCD HD44780 library @ Github
[#/python/libraries/apds9930″ ]