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

Increased delay for HTU21D compatibility #17

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions _P014_SI7021.ino
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,17 @@ int8_t Plugin_014_si7021_startConv(uint8_t datatype, uint8_t resolution)
// Tried clock streching and looping until no NACK from SI7021 to know
// when conversion's done. None have worked so far !!!
// 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
if (resolution == SI7021_RESOLUTION_11T_11RH)
delay(4);
else if (resolution == SI7021_RESOLUTION_12T_08RH)
delay(5);
delay(6);
else if (resolution == SI7021_RESOLUTION_13T_10RH)
delay(8);
delay(9);
else
delay(12);
delay(17);

/*
// Wait for data to become available, device will NACK during conversion
Expand Down