Hi!

Maybe the code needs more time than 1 ms to run, that is why you
cannot do this. Also, if I know correctly, you cannot run less than 2
ms timers on the IRIS, but I am not positive about this.

Best,
Miklos

On Tue, Jun 28, 2011 at 7:11 PM, Achintha Maddumabandara
<[email protected]> wrote:
> Hi,
>
> I'm using MTS310CB sensor board with IRIS mote.
> I need to sample the Tone Detector in every millisecond.
> So I'm thinking of using a Timer with 1ms interval.
>
> But when I run the code it didn't work.
> It worked only when the timer interval is greater than or equal to 3ms.
> Is there a problem with my approach?
>
> Here is the code
>
>  event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr m){
>        call Leds.yellowToggle();
>        call TimerSample.start(TIMER_REPEAT, 1);
>        return m;
>  }
>
>   event result_t TimerSample.fired()
>  {
>        call TimerSample.stop();
>        call Leds.redToggle();
>        return SUCCESS;
>  }
>
> Please help
> Achintha
>
> --------------------------------------------------
> Mr. Achintha Maddumabandara
> Department of Electrical and Computer Engineering,
> Schulich School of Engineering,
> University of Calgary,
> Canada
>
> ==================================================
> Every living thing has a right to live!
> Including the little lamb :)
> --------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>

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

Reply via email to