Skip to content

Commit 905fcfc

Browse files
authored
Merge pull request #14 from kattni/fix-up
Update version info, README
2 parents 6324f27 + 2a467d7 commit 905fcfc

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

README.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,25 @@ To install in a virtual environment in your current project:
5656
Usage Example
5757
=============
5858

59+
.. code-block:: python
60+
61+
import board
62+
import busio
63+
import digitalio
64+
from adafruit_apds9960.apds9960 import APDS9960
65+
66+
i2c = busio.I2C(board.SCL, board.SDA)
67+
int_pin = digitalio.DigitalInOut(board.D5)
68+
apds = APDS9960(i2c, interrupt_pin=int_pin)
69+
70+
apds.enable_proximity = True
71+
apds.proximity_interrupt_threshold = (0, 175)
72+
apds.enable_proximity_interrupt = True
73+
74+
while True:
75+
print(apds.proximity())
76+
apds.clear_interrupt()
77+
5978
Hardware Set-up
6079
---------------
6180

adafruit_apds9960/apds9960.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
from adafruit_bus_device.i2c_device import I2CDevice
3636
from micropython import const
3737

38+
__version__ = "0.0.0-auto.0"
39+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_APDS9960.git"
3840

3941
# ADDRESS_DEF = const(0x39)
4042
# INTEGRATION_TIME_DEF = const(0x01)

adafruit_apds9960/colorutility.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* Author(s): Michael McWethy
2929
"""
3030

31+
__version__ = "0.0.0-auto.0"
32+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_APDS9960.git"
3133

3234
def calculate_color_temperature(r, g, b):
3335
"""Converts the raw R/G/B values to color temperature in degrees Kelvin"""

0 commit comments

Comments
 (0)