Hi,
I am trying to learn the I2c with nrf5340 PDK. I need to interface Sht20 and Mlx90614 with nrf5340PDK. I need to know the procedures regards this on NRF Connect SDK
Thanks & Regards
Navin
Hi,
I am trying to learn the I2c with nrf5340 PDK. I need to interface Sht20 and Mlx90614 with nrf5340PDK. I need to know the procedures regards this on NRF Connect SDK
Thanks & Regards
Navin
Hello Navin,
So I guess that:
i2c_write(i2c_dev,command,sizeof(command), eSHT2xAddress); k_msleep(300);
requests data from the sensor? What is the command you are writing to this function? Could you please check the return value of its call?
My assumption at the moment is that the buffer is not updated with new values.
Regards,
Markus
Hello Navin,
So I guess that:
i2c_write(i2c_dev,command,sizeof(command), eSHT2xAddress); k_msleep(300);
requests data from the sensor? What is the command you are writing to this function? Could you please check the return value of its call?
My assumption at the moment is that the buffer is not updated with new values.
Regards,
Markus
Hi Markus,
Command = Register address;
its returns some value but not accurate
can you please tell me how to rewrite the below section for nrf?
Wire.requestFrom(eSHT2xAddress, 3); uint32_t timeout = millis() + 300; // Don't hang here for more than 300ms while (Wire.available() < 3) { if ((millis() - timeout) > 0) { return 0; }
this same issue follows for mlx90641 also.
Thanks & Regards
Navin