dotnet / iot

This repo includes .NET Core implementations for various IoT boards, chips, displays and PCBs.
MIT License
2.16k stars 580 forks source link

API support for SenseHat V2 Color Sensor TCS34725 #2088

Open Ducki opened 1 year ago

Ducki commented 1 year ago

The revision 2 of the Raspberry Pi SenseHat has a color sensor TCS34725, which is currently unsupported in the SenseHat bindings.

The sensor itself is already implemented, but it would be nice, if it was usable via the SenseHat binding.

Ellerbach commented 1 year ago

Feel free to raise a PR to add it. We're not tracking the binding requests. So I'm leaving this one open a little bit but it will be closed in one of the next triage we'll collectively have.

krwq commented 1 year ago

[Triage] You'll need to create something similar to https://github.com/dotnet/iot/blob/main/src/devices/SenseHat/SenseHatMagnetometer.cs and add property like this: https://github.com/dotnet/iot/blob/main/src/devices/SenseHat/SenseHat.cs#L48 - you need to find address first and handle errors in case someone is still using older version of SenseHat

Ducki commented 1 year ago

So while investigating, I found out that I was wrong about the sensor. The color sensor on the SenseHat seems to have changed recently to a different model: TSC3400 (which is not covered in the device bindings as of yet).

Source: https://github.com/astro-pi/python-sense-hat/issues/126#issuecomment-1319782198

I'm sorry about that, but my low level skills aren't good enough to implement the other sensor. :)

raffaeler commented 1 year ago

@Ducki All what we can do is leaving the ticket open for a while to see if there is someone owning the hardware and willing to contribute with a PR. If this doesn't happen, the issue will be closed.

Ellerbach commented 1 year ago

TSC3400 (which is not covered in the device bindings as of yet).

I just checked and indeed, the sensors are different. The excellent news is that they are vey close. So it should be a matter of hours to adjust/adapt/extend the existing one to support the 3400 ones. 3400 seems to have Infra red as well. I don't have this sensor at all but I'm happy to support and help.