Never worked with it, but usually you need to initialize a seed. If you want different values - every time a different one.
Arik On Thu, Apr 29, 2010 at 04:24, Roberto Pagliari <robertodemed...@gmail.com>wrote: > 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? > > Thanks > > -- > Roberto > > _______________________________________________ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Best Regards, Arik Sapojnik
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help