Problems reading register from I2C sensor using HAL_I2C
Hi guys ! I’m in a bit of a pickle so I finally decided to ask ..
I’m using a Dragino sensor node based on STM32. I need to change the default software to be able to read an I2C pressure WNK sensor. I know the sensor’s address is 0x6D. I also know that the registers I need to read are 06,07 and 08. I’m happy for now to read just the first 2(06 and 07).
The default programming uses HAL_I2C_*** library and I have tried everything I could think of to read these registers. I am using a uint8_ t txdata[1]={0x06} to initialise and set the pointer to the first register and an uint8_t rxdata[2] to read the content of the register. I feel really dumb right now to be honest so any suggestion would be greatly appreciated.
I am writing this from my phone hence the missing code.. but I’m happy to share the code once I am back in front of my computer.
Thank you in advance for any ideas!
Nick