Hi Yasserz, You may have a look at the wonderful tutorials available in http://docs.tinyos.net/index.php/TinyOS_Tutorials Further this, you can find all the interfaces and how to use them in the folder interfaces inside the tinyos tree. It is even more accesible if you use the Yeti2 plugin for Eclipse, since it autocomplete and show description while coding.
Anyway, I think you could to use: declare for this component: uint32_t period; uint32_t delay; uint16_t packetCounter; Start the timer whenever you want: delay = 1024*60*5; // 5 minutes in milliseconds timerTx.startPeriodicAt ( delay, period ); Update counter: Send.sendDone ( .... ) { if (counterPacket == PACKET_NUM ) { timer.stop (); while ( timer.isRunning() ); // wait till timer stops timerIdle.startOneShot ( any period ); } } And when event timerIdle.fired () happens then start the other timer again: timerTx.startPeriodicAt ( delay, period ); Cheers!!! Sergio On Sat, Jan 15, 2011 at 4:28 AM, Yasser Zahedi <yasserzah...@gmail.com> wrote: > Hello all, > I want to program the MICAz mote in such that when I turn on the mote, it > should start transmitting the packetsĀ after a specific period of time (ex:5 > min.). > In addition, when it starts transmitting a specific no. of packets, it > should stop forĀ also a specific time and then start transmitting again. > I think I should adapt in the 'timer'. Can I do that and how? > > Thank you > > _______________________________________________ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help