adafruit / Adafruit_CircuitPython_APDS9960

Adafruit Bundle driver for APSD9960 Gesture breakout board
MIT License
11 stars 17 forks source link

"interrupt_pin" constructor arg causes error, internal "_interrupt_pin" var is never used #33

Closed fivesixzero closed 2 years ago

fivesixzero commented 2 years ago

The class doc states that it expects a Pin but, when given a Pin object, the library throws this error:

>>> light = APDS9960(i2c, interrupt_pin=board.PROXIMITY_LIGHT_INTERRUPT)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_apds9960/apds9960.py", line 155, in __init__
AttributeError: 'Pin' object has no attribute 'switch_to_input'

Since this internal variable is never used it may be best to just remove it.

fivesixzero commented 2 years ago

This has been addressed with #34 merged in, closing this issue. :D