This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

TH02 sensor for temperature and humidity measurement

Hi

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?

Parents Reply
  • 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. 

Children
Related