Mine
public text v1 · immutable# save as rand.py
import hal, random, time
comp = hal.component("rand")
comp.newpin("out", hal.HAL_FLOAT, hal.HAL_OUT)
comp.ready()
try:
while 1:
comp['out'] = random.uniform()
time.sleep(random.uniform() * .1)
except KeyboardInterrupt: pass