[Tinyos-help] TinyOS MICAz GpioInterrupt
Varun Jain
varun at spiderbox.com.au
Mon Jul 6 16:26:17 PDT 2009
Have a look in the applications at /tests/telosb/ ---- > there is an
implementation for UserButton present for telosb platform.
Cheers,
Varun Jain
From: tinyos-help-bounces at millennium.berkeley.edu
[mailto:tinyos-help-bounces at millennium.berkeley.edu] On Behalf Of Vivek
Agate
Sent: Tuesday, 7 July 2009 4:16 AM
To: tinyos-help at millennium.berkeley.edu
Subject: [Tinyos-help] TinyOS MICAz GpioInterrupt
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090707/7007d558/attachment.htm
More information about the Tinyos-help
mailing list