Is there an issue with Random on ESP32?



I am running the ESP32 DevKitC, and I’d need a random number between 1 and 15. So I wrote the following:

Random tester

import streams
import random
print random.randint(0, 5)

But this fails at compilation time:

error] Syntax error [invalid syntax (, line 10)] in [C:\Users\heikki.hietala\Random_tester\] at line 9

I have located the file, and put that in the same folder ad my, but that one gives me a syntax error somewhere in the middle of the file.

Any help in sorting this out would be much appreciated.


Hi @Heikki_Hietala,

in Zerynth Python random is a builtin function :slight_smile:


My bad - I wasn’t able to locate it in the documentation. Many thanks!