Hi everyone,

I'm doing a modified code from lesson3 of the tutorial. I removed the timer
and now I want the sensor sends when base sends it a flag. I'm doing that
with the next code on the base:

void task SendFlag()
  {
    atomic sending_packet = TRUE;

if (call SendMsg.send(port,sizeof(XDataMsg),&msg_buffer) != SUCCESS) //port
is id of the sensor, but I tested with broadcast send and I haven't results
  call Leds.redToggle();
  sending_packet = FALSE;
return;
  }

Red led lights good. The code I put on the sensor to receive the message is:

event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr msg){//, void* payload,
uint8_t len
call Leds.redToggle();
call PhotoControl.start();
        call Light.getData();
        return msg;
}
But now Red led of sensor not lights and sensor sends nothing :(.

Any suggestion?

Thanks in advance,

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

Reply via email to