I am using TH02 for temp and RH measurement
I understand I must use TWI provided in SDK. However, I a working have c++ library(Wire.h) for I2C that I used with Arduino IDE and TH02 sensor . Will it work if I include it in my KEIL project provided in SDK and not use TWI drivers at all?
Will it work if I include it in my KEIL project provided in SDK and not use TWI drivers at all?
In that case here is my actual problem.
In order to read values from TH02 sensor(Address: 0x40) I first need to give a command i.e. write 0x01(for temperature) and 0x11(for RH) resp into internal CONFIG register(having address 0x03) and then read the values.
I am unable to understand where to write my commands in the nrf_drv_twi_tx() function after which I can read using nrf_drv_twi_rx() function.
Please let me know if you can help with this. Here is the datasheet for TH02 sensor.
If you take a look at the TWI Sensor Example, it is located in the LM75B_set_mode() function.
Please also see this post.