Hi,

Use one-shot timer to do it.
Eg :
uint8_t u8_variableVal;
StdControl.start()
{
  call Timer.startOneShot(1000); // 1s delay for each LED
}

event Timer.fired()
{
  call Led.led0Toggle();
  
  if (u8_variableVal-- > 0) call Timer.startOneShot(1000);
}

Regards,
-daniel

-------- Original Message --------
> From: Yesid Jarma <[EMAIL PROTECTED]>
> Sent: Friday, July 13, 2007 3:03 PM
> To: tinyos-help@Millennium.Berkeley.EDU
> Subject: [Tinyos-help] Led Blinking
> 
> Hello,
> 
> Is there an easy way to make one led on a mote blink a determined number 
> of times??
> I want to show the value of a variable by making one led blink.  For 
> instance, if the variable
> is 5, the led should blink 5 times, every 10 seconds.  But the leds 
> should blink 1 time every 5 seconds
> so there will be 5 seconds to spare.
> 
> Here's a little diagram:
> 
> BBBBB-----BBBBB-----BBBBB-----
> |--10s---|
> 
> Any ideas????
> 
> -- 
> Yesid JARMA < [EMAIL PROTECTED] >
> Tel. +33(6)79480903




_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to