I have been trying to recieve data from a Nonin Ipod( it sends data serially) and transmit the data to 2nd mote. That is, 1st mote gets data from the NoninIpod, it is connected to the pin 27 of the mica2 mote1. Then the mote transmits this data to 2nd mote
tried the following:
***********************************
configuration myhpl {
}
implementation
{
components Main, MyhplM, HPLUARTC, LedsC;
Main.StdControl -> MyhplM.StdControl;
MyhplM.HPLUART -> HPLUARTC;
MyhplM.Leds -> LedsC;
}
------------------------------------------------
module MyhplM {
provides {
interface StdControl;
}
uses {
interface HPLUART;
interface Leds;
//interface Timer;
}
}
implementation {
command result_t StdControl.init() {
call Leds.init();
call Leds.redOff();
call Leds.yellowOff();
call Leds.greenOff();
return SUCCESS;
}
command result_t StdControl.start() {
call HPLUART.init(); // Initialize UART0
module
//return call Timer.start(TIMER_REPEAT, 1000);
}
command result_t StdControl.stop() {
return call HPLUART.stop(); // Disable UART0
module
//return call Timer.stop();
}
async event result_t HPLUART.get(uint8_t value)
{
if (value & 8) call Leds.redOn();
else call Leds.redOff();
if (value & 16) call Leds.greenOn();
else call Leds.greenOff();
if (value & 32) call Leds.yellowOn();
else call Leds.yellowOff();
return SUCCESS;
}
async event result_t HPLUART.putDone()
{
//call Leds.greenOn();
return SUCCESS;
}
/*event result_t Timer.fired()
{
call Leds.redOff();
call Leds.greenOff();
call Leds.yellowOff();
return
}*/
}
-----------------------------------------------------
The program doesnt work propertly. The Leds light up when I connect both pin 27 and 28 to the IPOD. If anyone could make any suggestions, or offer any other advise, i'd appreciate it a lot
cheers
manish
The surest sign that intelligent life exists elsewhere in the universe is that it has never tried to contact us. ~Bill Watterson, Calvin and Hobbes
Yahoo! Mail goes everywhere you do. Get it on your phone.
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
