Skip to content

Commit

Permalink
doc/ev3devices/UltrasonicSensor: add freeze note
Browse files Browse the repository at this point in the history
Simplify the text for silent mode, and add a note to say what to do if it stops working when the UART gets confused.
  • Loading branch information
laurensvalk committed Apr 7, 2020
1 parent d2a480f commit 32ab928
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pybricks/ev3devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,10 @@ def distance(self, silent=False):
Arguments:
silent (bool): Choose ``True`` to turn the sensor off after
measuring the distance. Choose ``False`` to leave
the sensor on. When you choose
``silent=True``, the sensor does not
emit sounds waves except when taking the
measurement. This reduces interference with other
ultrasonic sensors, but turning the sensor off takes
approximately 300 ms each time.
measuring the distance. This reduces interference
with other ultrasonic sensors. If you do
this too frequently, the sensor can freeze.
If this happens, unplug it and plug it back in.
Returns:
:ref:`distance`: Distance.
Expand Down

0 comments on commit 32ab928

Please sign in to comment.