Skip to content

add different device ID #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 20, 2023
Merged

add different device ID #45

merged 2 commits into from
Nov 20, 2023

Conversation

dertobias
Copy link

RuntimeError Exception prohibits code to proceed.
Tested with (apds)GY-9960 board.

RuntimeError Exception prohibits code to proceed.
Tested with (apds)GY-9960 board.
@FoamyGuy
Copy link

@dertobias could you modify the code to print the value of self._read8(_APDS9960_ID) on your device? It sounds to me like your device is some sort of variation that has a different ID.

I think it would be best if we added a new ID to a list of valid IDs to check rather than removing the logic to check them entirely.

@dertobias
Copy link
Author

you're right. it prints 168. So adding it as device_id2 0xa8 worked on my end :)

@FoamyGuy
Copy link

@dertobias If you're up to it can you change this PR (or submit a new one) to refactor DEVICE_ID to be a list or tuple and then have the logic use something if self._read8(_APDS9960_ID) not in DEVICE_IDS:

Changed IDs to tuple and added new chip ID
@dertobias dertobias changed the title RuntimeError not needed add different device ID Nov 14, 2023
@dertobias
Copy link
Author

@FoamyGuy patch works for me :)

Copy link

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the addition @dertobias!

I tested this successfully on a CLUE

@FoamyGuy FoamyGuy merged commit 43b7df2 into adafruit:main Nov 20, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 21, 2023
@dertobias dertobias deleted the patch-1 branch November 21, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants