I use TinyOS 2.1 with telosb and I know that the sensor on telosb are Sht11
and HamamatsuS10871TsrC and HamamatsuS10871ParC , The component which I use
in my configuration file GestioneC are
components new SensirionSht11C();
components new HamamatsuS10871TsrC() as PhotoActiveC;
components new HamamatsuS1087ParC() as TotalSolarC;
and the interface I use in module Sensori1 are
interface Read<uint16_t> as ReadVisible;
interface Read<uint16_t> as ReadNotVisible;
interface Read<uint16_t> as ReadTemp;
interface Read<uint16_t> as ReadHum;
and so I can wire the interfaces with the components as follow:
Sensori1.ReadHum ->SensirionSht11C.Humidity;
Sensori1.ReadTemp ->SensirionSht11C.Temperature;
Sensori1.ReadNotVisible -> PhotoActiveC;
Sensori1.ReadVisible -> TotalSolarC;
Making this when I do make telosb I have no errors but when i read sensors
with
call ReadTemp.read();
call ReadHum.read();
call ReadVisible.read();
call ReadNotVisible.read();
I obtain a value for the temperature that isn't right because I have at
ReadTemp.Done at whether temp 6876 (((6876/4096)*1,5)-0,986)/0,00355 = 431.I
say this because the components
/**
* Msp430InternalTemperatureC is the temperature sensor available on
* the msp430-based platforms.
*
* To convert from ADC counts to temperature, convert to voltage by
* dividing by 4096 and multiplying by Vref (1.5V). Then subtract
* 0.986 from voltage and divide by 0.00355 to get degrees C.
*/
The second problem is :I'd like to use
interface SensirionSht11 as Sensor
but I'm not able to connect to any component.This interface provides right
command as :
call Sensor.measureHumidity();
call Sensor.measureTemperature();
So How to use the interface SensirionSht11 and how to trasform the value of
the Read.read interface of Temperature sensor ?
Thank in advance
Giorgio
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help