Skip to content
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

TCS34725 and TCS3400 support #131

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

tvoverbeek
Copy link
Contributor

Detects the used sensor. so the same code supports both. TCS3400 is used for the Sense Hat V2 while the (discontinued) TCS34725 is used on the AstroPi sense hat for the ISS.

Also included a bug fix for the computation of the red_raw, green_raw, blue_raw and clear_raw values. The original code ony fetched the LSB, not the complete 16-bit value.

See also issue #126

Detects the used sensor. so the same code supports both.
TCS3400 is used for the Sense Hat V2 while the (discontinued) TCS34725 is used on the AstroPi sense hat for the ISS.

ALso a bug fix for the computation of the red_raw, green_raw, blue_raw and clear_raw values. The original code ony fetched the LSB.
@G3zz
Copy link
Contributor

G3zz commented Nov 28, 2022

Thanks very much for this - I need to acquire a sense hat with the TCS3400 so that I can test this PR. Hopefully that will be soon

@tvoverbeek
Copy link
Contributor Author

@G3zz Just FYI tested myself on Sense Hat v2 (with TCS3400) and Sense Hat V1 (wthout colour sensor).
For obvious reasons I could not test it on the ISS version with TCS34725.

@G3zz
Copy link
Contributor

G3zz commented Nov 29, 2022

Thank you. I should have acquired a TCS3400 HAT by next week, I hope - so I should be able to test all three HAT versions next week.
G3zz

@lurch
Copy link
Contributor

lurch commented Jan 25, 2023

I guess the colour sensor also ought to be mentioned on https://github.com/astro-pi/python-sense-hat/blob/master/README.md ?

@G3zz
Copy link
Contributor

G3zz commented Oct 11, 2023

I had a very hard time getting hold of a TCS3400 HAT in the end, as I kept getting sent one with a TCS34725 version...
I've finally got one and tested your PR and it works well - thank you very much!

@G3zz G3zz merged commit e67ea40 into astro-pi:master Oct 11, 2023

# Set type specific constants
# Assume TCS3472x as in AstroPi
sensor == 'TCS3472x'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this line (with a double-equals but no if) redundant?

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.

None yet

3 participants