pimoroni / unicorn-hat-hd

Python library and examples for Unicorn HAT HD
https://shop.pimoroni.com/products/unicorn-hat-hd
MIT License
172 stars 69 forks source link

Detecting hat using EEPROM Product ID. #47

Closed SeanCline closed 1 year ago

SeanCline commented 3 years ago

Hello!

I'd like to detect whether the Unicorn HAT HD is installed so my Gif2UnicornHat tool can automatically work on both the Unicorn HAT and the Unicorn HAT HD.

With the Unicorn HAT, I can just cat /proc/device-tree/hat/product and it tells me I have a Unicorn HAT installed. That's not so with the Unicorn HAT HD. I get No such file or directory.

I see that the Unicorn pHAT has no EEPROM which means no auto-detect even though the pinout says it has an EEPROM product ID.

So, is there some way to detect this? Or perhaps pinout.xyz is wrong for both the Unicorn pHAT and Unicorn HAT HD?

Gadgetoid commented 1 year ago

The pHAT does not have an EEPROM (No pHAT products do), Pinout is wrong :grimacing: