doc/pupdevices: add Motor measuring examples

This commit is contained in:
Laurens Valk
2020-07-21 14:50:26 +02:00
parent 51f9d916e0
commit 98f247688e
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -91,6 +91,19 @@ Motors with Rotation Sensors
.. rubric:: Measuring
.. toggle-header::
:header: **Show/hide examples**
**Example 1: Measuring the angle and speed**
.. literalinclude::
../../pybricks-projects/snippets/pup/motor/motor_measure.py
**Example 2: Resetting the measured angle**
.. literalinclude::
../../pybricks-projects/snippets/pup/motor/motor_reset_angle.py
.. automethod:: pybricks.pupdevices.Motor.speed
.. automethod:: pybricks.pupdevices.Motor.angle