Hi,

 

I have developed an application in order to get environmental measures by
sending Command Messages from TOS_BASE mote.

 

The strange situation is that there is no problem whenever I send either PAR
or TSR Light query measures, since I am getting the measures from the nodes
in a good way, so why do I have problem with Sensirion sensor with Humidity
and Temperaature?

 

I write my code below:

 

event TOS_MsgPtr QueryNowReceive.receive(TOS_MsgPtr m){

            TOS_MsgPtr copymessage = m;

            struct QueryMeasureNowMsg  * querynowmsg = (struct
QueryMeasureNowMsg *) copymessage ->data ;

            TOS_Msg responsemsg; 

          struct ResponseMeasureNowMsg * connectresponsemsg = (struct
ResponseMeasureNowMsg *)(responsemsg.data);

          //

          if (CONNECTED && (copymessage -> addr  == TOS_LOCAL_ADDRESS) ) {
// EL mensaje era para mi

            if ( (querynowmsg-> measuretype) == TEMPERATURE_TYPE){

                  call HumidityControl.start();

                  TemperatureNow = TRUE;

                  call Temperature.getData();

            } else if  (querynowmsg-> measuretype == HUMIDITY_TYPE) {

            //    call Leds.yellowToggle();

                  call HumidityControl.start();

                  HumidityNow = TRUE;

                  call Humidity.getData();

            } else if (querynowmsg-> measuretype == PAR_TYPE) {

                  call HamamatsuControl.start();

                  PARNow = TRUE;

                  call PAR.getData();

            }else if (querynowmsg-> measuretype == TSR_TYPE) {

                  call HamamatsuControl.start();

                  TSRNow = TRUE;

                  call TSR.getData();

            }..

 

Each time the node receives a message QueryNowReceive type, check the
measuretype value and if it is HUMIDITY_TYPE then makes a call to
Humidity.getData(), the problem is that Humidity.dataReady is never called.

 

Any hint would be great

 

Environment: TinyOS 1.x

 

Thank you in advance

 

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to