Hello!
I am trying to sample the internal sensor of a telosb mote.
At TempC.nc I have

module TempC{
...
uses interface Read<uint16_t> as Temp;
...
}

and at TempAppC.nc

implementation{
...
components TempC;
components new SensirionSht11C() as Temp;
...

TempC.Temp->Temp.Temperature;
...
}

In TempC.nc I call read() and I print the uint16_t data returned by
Temp.readDone.
It is about 6200. In order to convert this value to Celsius I follow the
instructions given in
tinyos-2.1.0/tos/chips/msp430/sensors/Msp430InternalTemperatureC.nc

I multiply the value with 1.5 and I divide the result by 4096. Then I
subtract 0.986 and I divide with 0.00355.
Unfortunately this formula return a huge value, about 350. No way my room
is that hot! :-)

On the other hand I found (
http://www.eecs.iu-bremen.de/wiki/index.php/TinyOS) the following
conversions formulas:
-40+0.01*data and
-38.4+0.0098*data

Those give nicer results, but...which one should I use? Neither of them
give the exact same result as my thermometer but they are both quite close.
And why the conversion formula given in Msp430InternalTemperatureC.nc does
not work?
Thank in advance,
Georgia
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to