Dear All,
May i know how i could generate random number on rabbit?
currently i’m using rcm3305 with dc 9.25
i was try using srand and rand function.
but the return value from rand function is float.
is it a way to get random integer/byte?
this is my code:
tm_rd(&rtc);
i = rtc.tm_sec;
srand (i);
/* KEY1 and KEY2 is float, i can’t change to
byte or integer even with casting…
any help?
*/
KEY1 = rand(0,255);
KEY2 = rand();
cheers,
Me