Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the timing for the HTU21D #44

Merged
1 commit merged into from Jul 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions _P014_SI7021.ino
Expand Up @@ -260,7 +260,7 @@ int8_t Plugin_014_si7021_startConv(uint8_t datatype, uint8_t resolution)
// I fade up, I'm waiting maximum conversion time + 1ms, this works !!
// I increased these value to add HTU21D compatibility
// Max for SI7021 is 3/5/7/12 ms
// max for HTU21D is 3/5/8/16 ms
// max for HTU21D is 7/13/25/50 ms

// Martinus modification 2016-01-07:
// My test sample was still not working with 11 bit
Expand All @@ -271,13 +271,13 @@ int8_t Plugin_014_si7021_startConv(uint8_t datatype, uint8_t resolution)
// hum+temp delay because it also measure temp

if (resolution == SI7021_RESOLUTION_11T_11RH)
tmp = 4;
tmp = 7;
else if (resolution == SI7021_RESOLUTION_12T_08RH)
tmp = 6;
tmp = 13;
else if (resolution == SI7021_RESOLUTION_13T_10RH)
tmp = 9;
tmp = 25;
else
tmp = 17;
tmp = 50;

// Humidity fire also temp measurment so delay
// need to be increased by 2 if no Hold Master
Expand Down