|
19 | 19 | * Adafruit `APDS9960 Proximity, Light, RGB, and Gesture Sensor
|
20 | 20 | <https://www.adafruit.com/product/3595>`_ (Product ID: 3595)
|
21 | 21 |
|
| 22 | +* Adafruit `Adafruit CLUE |
| 23 | + <https://www.adafruit.com/product/4500>`_ (Product ID: 4500) |
| 24 | +
|
| 25 | +* Adafruit `Adafruit Feather nRF52840 Sense |
| 26 | + <https://www.adafruit.com/product/4516>`_ (Product ID: 4516) |
| 27 | +
|
| 28 | +* Adafruit `Adafruit Proximity Trinkey |
| 29 | + <https://www.adafruit.com/product/5022>`_ (Product ID: 5022) |
| 30 | +
|
22 | 31 | **Software and Dependencies:**
|
23 | 32 |
|
24 | 33 | * Adafruit CircuitPython firmware for the supported boards:
|
|
27 | 36 | * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
|
28 | 37 | """
|
29 | 38 | import time
|
30 |
| -import digitalio |
31 | 39 | from adafruit_register.i2c_bits import RWBits
|
32 | 40 | from adafruit_register.i2c_bit import RWBit
|
33 | 41 | from adafruit_bus_device.i2c_device import I2CDevice
|
@@ -97,8 +105,7 @@ class APDS9960:
|
97 | 105 | """
|
98 | 106 | APDS9900 provide basic driver services for the ASDS9960 breakout board
|
99 | 107 |
|
100 |
| - :param ~busio.I2C i2c: The I2C bus the BME280 is connected to |
101 |
| - :param ~microcontroller.Pin interrupt_pin: Interrupt pin. Defaults to `None` |
| 108 | + :param ~busio.I2C i2c: The I2C bus the ASDS9960 is connected to |
102 | 109 | :param int address: The I2C device address. Defaults to :const:`0x39`
|
103 | 110 | :param int integration_time: integration time. Defaults to :const:`0x01`
|
104 | 111 | :param int gain: Device gain. Defaults to :const:`0x01`
|
@@ -136,23 +143,13 @@ class APDS9960:
|
136 | 143 | _proximity_persistance = RWBits(4, APDS9960_PERS, 4)
|
137 | 144 |
|
138 | 145 | def __init__(
|
139 |
| - self, |
140 |
| - i2c, |
141 |
| - *, |
142 |
| - interrupt_pin=None, |
143 |
| - address=0x39, |
144 |
| - integration_time=0x01, |
145 |
| - gain=0x01, |
146 |
| - rotation=0 |
| 146 | + self, i2c, *, address=0x39, integration_time=0x01, gain=0x01, rotation=0 |
147 | 147 | ):
|
148 | 148 |
|
149 | 149 | self.buf129 = None
|
150 | 150 | self.buf2 = bytearray(2)
|
151 | 151 |
|
152 | 152 | self.i2c_device = I2CDevice(i2c, address)
|
153 |
| - self._interrupt_pin = interrupt_pin |
154 |
| - if interrupt_pin: |
155 |
| - self._interrupt_pin.switch_to_input(pull=digitalio.Pull.UP) |
156 | 153 |
|
157 | 154 | if self._read8(APDS9960_ID) != 0xAB:
|
158 | 155 | raise RuntimeError()
|
|
0 commit comments