[Tinyos-help] How to measured temparature, humidity and light

vazoumana fofana zoumlander at hotmail.com
Mon Jul 2 14:10:56 PDT 2007


i want to know something : is this code available for tinyos 1 , tinyos 2 or 
both


Thanks

>From: "Aleksandr N. Sadkov" <somethinaxel at wl.unn.ru>
>To: "'Faisal Farman'" <smff_38 at hotmail.com>
>CC: tinyos-help at Millennium.Berkeley.EDU
>Subject: RE: [Tinyos-help] How to measured temparature, humidity and light
>Date: Mon, 2 Jul 2007 19:57:07 +0400
>
>Hello,
>
>
>
>I am using standard sensors on Tmote Sky.
>
>
>
>File BaseStationP.nc
>
>
>
>module BaseStationP {
>
>   uses {
>
>
>
>..............
>
>// for sensing
>
>             interface Read<uint16_t> as ReadTemperature;
>
>             interface Read<uint16_t> as ReadHumidity;
>
>             interface Read<uint16_t> as ReadIVoltage;
>
>             interface Read<uint16_t> as ReadLight;
>
>}
>
>
>
>implementation
>
>{
>
>
>
>...................
>
>// for sensing
>
>             uint16_t             temperature;
>
>             uint16_t             humidity;
>
>             uint16_t             ivoltage;
>
>             uint16_t             light;
>
>
>
>
>
>..................
>
>// for sensing
>
>
>
>event void ReadTemperature.readDone(error_t result, uint16_t data)
>
>   {
>
>     if (result == SUCCESS){
>
>       temperature = data;
>
>     }
>
>   }
>
>
>
>   event void ReadHumidity.readDone(error_t result, uint16_t data)
>
>   {
>
>     if (result == SUCCESS){
>
>       humidity = data;
>
>     }
>
>   }
>
>
>
>   event void ReadIVoltage.readDone(error_t result, uint16_t data)
>
>   {
>
>     if (result == SUCCESS){
>
>       ivoltage = data;
>
>     }
>
>   }
>
>
>
>     event void ReadLight.readDone(error_t result, uint16_t data)
>
>   {
>
>     if (result == SUCCESS){
>
>       light = data;
>
>     }
>
>   }
>
>
>
>
>
>
>
>............................
>
>
>
>// for sensing
>
>                         call ReadTemperature.read();
>
>                         call ReadHumidity.read();
>
>                         call ReadIVoltage.read();
>
>                         call ReadLight.read();
>
>.............................
>
>
>
>// for sensing
>
>                         mess2->tmprt=temperature;
>
>                         mess2->hmdt=humidity;
>
>                         mess2->ivt=ivoltage;
>
>                         mess2->lght=light;
>
>
>
>
>
>
>
>
>
>file BaseStationC.nc
>
>
>
>configuration BaseStationC {
>
>}
>
>implementation {
>
>..................
>
>
>
>// For sensing
>
>   components new SensirionSht11C() as SensorSht;
>
>   components new DemoSensorC() as SensorIVt;
>
>   components new HamamatsuS10871TsrC() as SensorLght;
>
>
>
>.......................
>
>// for sensing
>
>   BaseStationP.ReadTemperature -> SensorSht.Temperature;
>
>   BaseStationP.ReadHumidity -> SensorSht.Humidity;
>
>   BaseStationP.ReadIVoltage -> SensorIVt.Read;
>
>   BaseStationP.ReadLight -> SensorLght.Read;
>
>
>
>...................
>
>
>
>It's all.
>
>
>
>
>
>wbr, Sadkov Aleksandr
>
>axel at wl.unn.ru
>
>www.sumkino.com
>
>www.wl.unn.ru
>
>   _____
>
>From: tinyos-help-bounces at Millennium.Berkeley.EDU
>[mailto:tinyos-help-bounces at Millennium.Berkeley.EDU] On Behalf Of Faisal
>Farman
>Sent: Monday, July 02, 2007 4:35 PM
>To: tinyos-help at Millennium.Berkeley.EDU
>Subject: [Tinyos-help] How to measured temparature, humidity and light
>
>
>
>hi all, i m working in a project with tmotesky to measure temparature,
>humidity and light and to display it on the web, can any body help me doing
>that, it will be great if any body can guide me.
>
>Thanks in advance
>
>Faisal
>
>   _____
>
>Change is good. See what's different about Windows Live Hotmail. Check it
>out!
><http://www.windowslive-hotmail.com/learnmore/default.html?locale=en-us&ocid
>=RMT_TAGLM_HMWL_reten_changegood_0607>
>


>_______________________________________________
>Tinyos-help mailing list
>Tinyos-help at Millennium.Berkeley.EDU
>https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

_________________________________________________________________
Avec Windows Live OneCare éliminez tous les virus de votre PC ! 
http://www.windowslive.fr/liveonecare/default.asp



More information about the Tinyos-help mailing list