I connected a SI7021 sensor (temperature and humidity) to a BLE Nano.
The code is in the following repository:
The output of the program is the following:
That is 35.22%RH and 25.5 °C (the values are plausible, compared to another sensor)
I2C-Command 0xE3 is for the temperature (according to the SI7021-datasheet)
I2C-Command 0xE5 is for the humidity (according to the SI7021-datasheet)
In the code I had to use 0xE5 for temperature and 0xE3 for the humidity.
Why is this?
Thanks for helping me!
In your code you are sending extra data after the command byte. It looks like the device address followed by three zeros. Why are you doing this? Can you insert a delay instead to allow the conversion to take place and then read the data?
Thank you for the response!
You are right, with your suggestion I realized that the code is not as it should be.
I will try to fix it in the next days. (Due to other duties I am currently not able to work on that.)
If I have a working solution I will post it here.
I commited a fix. Though I will further test it next week.