lundi 17 juin 2019

random in MicroPython does appear to do anything?

Using pybricks-micropython

Running this command to get a random port number, works under CPython.

import random
port = random.randint(50000,50999)

produces a number, only it is hardly random it is the same number each time I run the script. I am guessing MicroPython needs something more perhaps?

What am I missing?




Aucun commentaire:

Enregistrer un commentaire