runtimeterror
Moderator
If I'm not mistaken the term "random((PI / 2.0), PI)" only produces the values 1 and 2. Is this by intention?
I'm fairly new to Arduino, but I guess that should have been something like "random(128, 256) / 256.0 * PI"
Or is there an implementation of "random()" which takes floats as arguments? I only found this: https://www.arduino.cc/reference/en/language/functions/random-numbers/random/
I don't understand the implications for the algorithm, though.
I'm fairly new to Arduino, but I guess that should have been something like "random(128, 256) / 256.0 * PI"
Or is there an implementation of "random()" which takes floats as arguments? I only found this: https://www.arduino.cc/reference/en/language/functions/random-numbers/random/
I don't understand the implications for the algorithm, though.