Hi,

I am trying to use the GpioInterrupt interface. Given below is the program
that I am using. The program toggles an LED whenever there is a falling edge
on Pin 6 (Intr 0).
However, the program does not work. The LED does not toggle at all. Can
anyone help me out in this regard?

I am using TinyOS version 2.1.0, MicaZ(MPR2400CA)

------------------------------------------------------------------------------------------------
GpioAppC.nc

configuration GpioAppC
{
}
implementation
{
  components MainC, GpioC, LedsC;
  components GpioInterruptC;


  GpioC -> MainC.Boot;

  GpioC.Leds -> LedsC;
  GpioC.Intr -> GpioInterruptC.Int0;
}

-----------------------------------------------------------------------------------------------
GpioC.nc

module GpioC @safe()
{
  uses interface Leds;
  uses interface Boot;
  uses interface GpioInterrupt as Intr;
}
implementation
{
  event void Boot.booted()
  {
        call Intr.enableFallingEdge();
  }

  async event void Intr.fired(){
        call Leds.led0Toggle();
  }
}

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

Reply via email to