From d8e1736a3c545ce99fa33abe443d1cc34638ee5e Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Fri, 26 Oct 2012 21:28:55 -0600 Subject: [PATCH] sht11: correct measurement timeout values --- tos/chips/sht11/SensirionSht11LogicP.nc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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; -- 2.39.2