I plan to use this nice simulator for an online teaching due to a coronavirus containment period.
I notice that a short ev3dev python script example:
from ev3dev2.sensor import *
from ev3dev2.sensor.lego import UltrasonicSensor
ultrasonic = UltrasonicSensor(INPUT_1)
while True:
print('Ultrasonic: ' + str(ultrasonic.distance_centimeters))
locks the browser tab.
A solution seems to be , as implemented for the other sensors, to add
time.sleep(SENSOR_DELAY)
in all the ultrasonic sensor function of sensors/lego.py.
Best regards
I plan to use this nice simulator for an online teaching due to a coronavirus containment period. I notice that a short ev3dev python script example:
locks the browser tab.
A solution seems to be , as implemented for the other sensors, to add
time.sleep(SENSOR_DELAY)
in all the ultrasonic sensor function of sensors/lego.py. Best regards