Hi
I ve got a question ? When you put into sleep a mote, it means that you
switch off the mote ? Or is it just a state where the energy consuption is
minimal ?
If you switch off the mote, data loaded in FLASH is lost or not ?
I ask this question cause i implemente a protocol like Spanning tree.
Thanks
From: "Murray, Ben" <[EMAIL PROTECTED]>
To:
"'[email protected]'"<[email protected]>
Subject: RE: [Tinyos-help] Duty cycle
Date: Mon, 20 Aug 2007 16:45:03 +0100
Hi Mona,
Sounds like you could probably use a 400 ms timer to periodically run your
task/job. In tos2 the MCU should automatically be put to sleep if there are
no tasks to run, although you can call McuSleep.sleep() yourself if you
need
to. Setlocalsleepinterval () is used to duty cycle the radio only. The
code below will call your job to start every 400 ms. If you wanted the gap
specifically to be 400 ms from the end of the job to the beginning of the
next job, rather than between the starts of successive jobs then you could
call a one shot timer every time your job finished instead. As long as
your
mote is not tasked with doing anything else during the 400 ms I think it
should automatically go to sleep.
event void Boot.booted() {
call Timer0.startPeriodic(400); //this will fire every 400ms
}
event void Timer0.fired(){ //called when Timer0 fires
callyourjob();
}
tep's 112 and 102 should be of interest I imagine...
-Ben
-----Original Message-----
From: mona zima [mailto:[EMAIL PROTECTED]
Sent: 20 August 2007 15:11
To: Murray, Ben
Subject: Re: [Tinyos-help] Duty cycle
Hi Daivd,
Thanks very much for your help and support.
I am wondering if you can help me with the following:
I would like to let the node sleep for 400 ms and then wakeup for some time
do some job and then return to sleep mode for 400ms and so on.... . I think
setLocalSleepInterval() will not help in this case!
Is it possible to specify the on and off periods in tinyos2.
kind regards
Mona
*******************************************************************************
Please consider the environment before printing this email.
*******************************************************************************
This email and any files transmitted with it are intended solely for the
use of
the individual or entity to whom they are addressed and may not be divulged
to
any third party without the express permission of the originator. Any
views
expressed in this message are those of the individual sender, except where
the
sender specifically states them to be the views of Thales Research &
Technology
(UK) Limited.
*******************************************************************************
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_________________________________________________________________
Découvrez le Blog heroic Fantaisy d'Eragon!
http://eragon-heroic-fantasy.spaces.live.com/
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help