Hi guys, I tried to go through the Lession 3 on the Wiki
(http://docs.tinyos.net/index.php/Mote-mote_radio_communication). I
had some problems there ---- it doesn't work. I order to find out what
the problem is, I wrote a code as simple as I can:

---------configuration file: BlinkToRadio.nc---------------------
configuration BlinkToRadioAppC {
}

implementation {
  components MainC,LedsC,BlinkToRadioC;
  //components ActiveMessageC;

  BlinkToRadioC -> MainC.Boot;
  BlinkToRadioC.Leds -> LedsC;
  //BlinkToRadioC.AMControl -> ActiveMessageC;
}
----------------------------------------------------------------------------------


-----------module: BlinkToRadioC.nc---------------------------------
module BlinkToRadioC {
  uses interface Boot;
  uses interface Leds;
  //uses interface SplitControl as AMControl;
}

implementation {
  event void Boot.booted() {
    call Leds.led0On();
  }

  /*
  event void AMControl.startDone(error_t err) {
  }
  event void AMControl.stopDone(error_t err) {
  }
  */
}
------------------------------------------------------------------------------

This program simply turns the led0 on. And it works well.

However, the strange part is, when I uncomment all the commented part
above, which is only wiring ActiveMessageC to BlinkToRadioAppC, the
program doesn't work anymore. Led 0 isn't on.

What's the reason could be? Thank you.

-- 
Cheers
Xi
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to