[Tinyos-help] [help-TinyOs] radio trasmission

margherita errichiello margheritae at hotmail.it
Wed Sep 17 06:16:49 PDT 2008


I am a student who works at ENEA research center  and working with telosb Motes type.
I am writing a software. It turns on the radio every 10 seconds, it sends empty packages, it turns off the radio. I attach the code :


module MyComponent
{	uses
	{	interface Boot;
		interface SplitControl as RadioControl;
		interface AMSend;
		interface Timer;
	}
}

implementation
{	typedef nx_struct oscilloscope
	{	nx_uint16_t version;
		nx_uint16_t interval;
		nx_uint16_t id;
		nx_uint16_t count;
		nx_uint16_t readings[10];
	} oscilloscope_t;

	message_t sendbuf;
	oscilloscope_t local;

	event void Boot.booted ( )
	{	call Timer.startPeriodic (10000);
	}

	event void RadioControl.startDone (error_t error) { }

	event void RadioControl.stopDone (error_t error) { }

	event void Timer.fired ( )
	{	call RadioControl.start ( );
		call AMSend.send (AM_BROADCAST_ADDR, &sendbuf, sizeof local);
	}

	event void AMSend.sendDone (message_t* msg, error_t error)
	{	call RadioControl.stop ( );
	}
}



 I have observed that  software needs of  5 seconds in order to turn on the radio. I can reduce the time to turn on the radio?


_________________________________________________________________
Stanco della solita finestra? Personalizza la tua Hotmail!
http://www.messenger.it/personalizza.html#sfondi


More information about the Tinyos-help mailing list