Skip to content

TSL2561 Chip id, part number, must 5? Code States That Datasheet is wrong? #37

@Jibun-no-Kage

Description

@Jibun-no-Kage

I have several TSL2561 sensors that return part number as 4 not 5. Various other scripts and libraries work, some even explicitly test for part number as 4. but the adafruit library fails, stating the part number must be 5. I commented out the test for part number as 5, and the adafruit library works with my TSL2561 sensors. I have also seen references to various TSL2561 ICs that report part number 4, 5, even 6.

Edit is to /usr/local/lib/python3.9/dist-packages/adafruit_tsl2561.py, change illustrated below:

In def init...
comment out...
if not partno == 5:

insert:
if partno not in [4,5]:

This retains of course allows partno to be 4 or 5. Any comments or suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions