Example for reading I2C sensor on Thing Plus Matter?

Hi all,

I’m creating a Matter-based air quality sensor and have successfully adapted the MatterLightOverThread sample to publish dummy temperature data that is visible in the Google Home app. I thought this would be the hardest part but proved not too difficult.

What I thought would be the easy part was reading data from a connected I2C temperature sensor (SHT3X). However, going through both the Sparkfun and Silicon Matter sites, I don’t see a straightforward example of doing this. I’ve found references to example I2C code that connects two boards together via I2C and sends data back and forth (https://github.com/SiliconLabs/peripher … main_efr.c) but even this requires porting to fully compile on the Thing Plus Matter’s MGM240P which I thus far haven’t been fully successful in doing.

Is there a simple example somewhere for how to read data from an I2C device using the Thing Plus Matter? Given its Qwiic connector, this seems like it should be a pretty common use case?

Thanks in advance for any guidance or pointers.

https://www.silabs.com/wireless/matter#start has a guide for getting started; it looks like there isn’t an i2c example ready-made…but you can port the code (that you linked above) over and get it goin’ that way

As for help porting the code, you might have some luck in posting the specific error @ compile on their forums?