random(a,b) not working on Wemos D1 mini


#1

Tested on one of the basic examples “Mini Web Server” the instruction random(0,100) always return 0. If I try to use random(21,126) I always get 21. I don’t get any warning or error after compile. I was wandering if it is possible to replace the random function with the VM RNG function and how…



#2

I Correct: I was wondering if you could use the VM RNG function in place of python “random” function.


#3

Also tested with a nodeMCU v2, same code, same response. Random function only return the first value ! Any ideas ??


#4

Hi ZioTo73,
the Zerynth random function should retrieve the value from the hardware random number generator but this is not happening in all the ESP8266 boards because of a bug. We have already solved it and the fix will be available in the next patch. 


#5

Hi ZioTo73

the new patch is out:
https://community.zerynth.com/discussion/550/patch-p02-for-zerynth-r2-0-10-is-available-with-support-for-nodemcu-esp-32s-and-bug-fixes

Enjoy!


#6

Yesss, it works fine ! :) Thank you.