Page 1 of 1

No Random() function in Z-Uno?

Posted: 28 Mar 2017 16:48
by Jiriki
Hi,

I was in the process of creating some code in the Z-Uno to simulate a candel, suprisingly I could not find any Random() function as in Arduino, this makes it quite complicated to do a simulation.

I would like to do this in the Z-Uno because in the Z-Uno I can define some "multi level switches" to play with the parameter for the simulation.

Can I expect a Random() function to be implemented in Z-Uno or is there a library I can use?

/Mats

Re: No Random() function in Z-Uno?

Posted: 29 Mar 2017 01:17
by PoltoS
We can add it in next releases (2.0.10). We even have the radio noise to seed it.

Re: No Random() function in Z-Uno?

Posted: 29 Mar 2017 09:21
by Jiriki
Great, thank you :)

Re: No Random() function in Z-Uno?

Posted: 28 Mar 2018 20:58
by michap
Any news about this ? ;)

Thanks!
Michael

Re: No Random() function in Z-Uno?

Posted: 29 Mar 2018 01:38
by Tillsy
A year later to the exact day! :)

Re: No Random() function in Z-Uno?

Posted: 30 Mar 2018 01:15
by PoltoS
rand() is here since last summer, but we forgot to document it ;)

Re: No Random() function in Z-Uno?

Posted: 30 Mar 2018 15:31
by p0lyg0n1
Here is an example:

Code: Select all

void setup() {
  Serial.begin();
}
void loop() {
  Serial.println(rand()%100);
  delay(1000);
}

Re: No Random() function in Z-Uno?

Posted: 06 Oct 2020 00:01
by bashNinja
Any chance of coming back to this and documenting it?