File tree 3 files changed +23
-0
lines changed
3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,25 @@ To install in a virtual environment in your current project:
56
56
Usage Example
57
57
=============
58
58
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
+
59
78
Hardware Set-up
60
79
---------------
61
80
Original file line number Diff line number Diff line change 35
35
from adafruit_bus_device .i2c_device import I2CDevice
36
36
from micropython import const
37
37
38
+ __version__ = "0.0.0-auto.0"
39
+ __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_APDS9960.git"
38
40
39
41
# ADDRESS_DEF = const(0x39)
40
42
# INTEGRATION_TIME_DEF = const(0x01)
Original file line number Diff line number Diff line change 28
28
* Author(s): Michael McWethy
29
29
"""
30
30
31
+ __version__ = "0.0.0-auto.0"
32
+ __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_APDS9960.git"
31
33
32
34
def calculate_color_temperature (r , g , b ):
33
35
"""Converts the raw R/G/B values to color temperature in degrees Kelvin"""
You can’t perform that action at this time.
0 commit comments