Hi all,
I intend to measure the difference in battery life between 2 MicaZ motes -
one using the HPLPowerManagementM module, and another mote not using this
module. Basically, a "signal" is sent from the base station to the 2 motes
before they send some data every alternate 1 sec. However, I noticed that this
module only seems to work for the "normal" module, but not with the "power
saving" module. The "normal" module is able to receive the signal from the
base station, but the "power saving" module doesn't (fyi, I used the same mote
to ensure that it has nothing to do with h/w fault). Below is an excerpt of my
code:
event TOS_MsgPtr ReceiveBcn.receive(TOS_MsgPtr msg) {
Start* s = (Start*)msg->data;
call Leds.redToggle();
if (s->nodeid == BASE_STATION && s->bs_signal == TRUE) {
if (TOS_LOCAL_ADDRESS == NODE_NORM) {
call Timer.start(TIMER_REPEAT, 1024);
}
else if (TOS_LOCAL_ADDRESS == NODE_SAVE) {
call Timer.start(TIMER_ONE_SHOT, 2038);
#ifdef __AVR__
call Enable();
call PowerManagement.adjustPower();
#endif
}
call Leds.yellowOn();
}
else {
call Leds.greenOff();
}
return msg;
}
Based on my "debugging" using the LEDs, NODE_NORM's red LED would toggle when
receiving the signal from the BASE_STATION, but not NODE_SAVE. Have I done the
coding wrongly?
Any help would be greatly appreciated.
Thank you.
Regards,Azhar
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help