From: R. Steve McKown Date: Sat, 27 Oct 2012 03:28:55 +0000 (-0600) Subject: sht11: correct measurement timeout values X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=d8e1736a3c545ce99fa33abe443d1cc34638ee5e sht11: correct measurement timeout values --- diff --git a/tos/chips/sht11/SensirionSht11LogicP.nc b/tos/chips/sht11/SensirionSht11LogicP.nc index f3f02697..84a903cf 100644 --- a/tos/chips/sht11/SensirionSht11LogicP.nc +++ b/tos/chips/sht11/SensirionSht11LogicP.nc @@ -74,9 +74,14 @@ implementation { enum { TIMEOUT_RESET = 11, - TIMEOUT_14BIT = 250, - TIMEOUT_12BIT = 250, //70, - TIMEOUT_8BIT = 250, //15, + + /* SHT1x_SHT7x_E data sheet v3.01 indicates readings take at most + * 320 ms for 14 bits, 80 ms for 12 bits and 20 ms for 8 bits. + * Add 20% as a safety margin. + */ + TIMEOUT_14BIT = 393, + TIMEOUT_12BIT = 98, + TIMEOUT_8BIT = 25, } sht_timeout_t; bool on = TRUE;