To check the master & slave I2C communication, I am using MCUxpresso IDE SDK I2C Polling I2C Example. I write the I2C address (for SHTC3 temperature sensor 0x77), transfer (writing) some data to Slave and try to receive that data (read). Master is writing data but can not read it properly. In the polling example, always receiving(read) random data is 0x0. As I am very new in this field I don't understand what's going on, what I need to. How should write the program for appropriately I2C Master & Slave connection? what is necessary information that needs to change for the SDK example? For example subaddress, subaddress size, data, data size, flags.
My project uses the following equipment:
- Project name: Gas detection
- MCU: NXP MKL27Z256LH4
- IDE: NXP MCUxpresso IDE
- Communication interface: I2C
- Sensor: SHTC3, BME688, SGP41 and 2/3 gas sensors will be added
- Programing language: C