Hello

I wrote a program which light the red led in Boot.Booted,
then in the same function I call a command my component
provided. In this command I initialize some gloabals variable.

When I put this code on my micaz seemingly nothing happen
since no led is lighting.

On the other hand when I comment the body of my command
the led is shinning.

What is the problem?


module program
{
   uses
{ interface Boot; interface Leds;
       }

   provides
{ command void init();
   }

}

implementation
{ uint8_t tab[20];

  event void Boot.booted()
{ if(TOS_NODE_ID==1) { call init();
       }
}
   command void init()
   {

uint8_t i=1;
       call Leds.led0On();

       for(i=0;i<20;i++)
       {
               atomic
               {
tab[i]=-1;//if I comment this line the red led of my micaz is shinning!!! } }

   }
}


thanks

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

Reply via email to