[Tinyos-help] random values

Roberto Pagliari robertodemedici at gmail.com
Wed Apr 28 18:24:13 PDT 2010

Hi All,
I tried this code

    value = call Random.rand16();
    if( (value & 1) == 1 ) {
      call BitVector.set(0);
      call Leds.led0On();

several times but, apparently, random always returns the same value. I wired
RandomC.Init to main. Do I need to do anything else?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20100428/c494a02b/attachment.htm 

More information about the Tinyos-help mailing list