- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
12-09-2016 11:03 AM
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!
Solved! Go to Solution.
12-09-2016 04:09 PM
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?
12-10-2016 06:56 AM
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.