From ada319f88db0131081a8a2f17f0eaf9bcf11065e Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 11 Nov 2019 13:30:08 +0100 Subject: [PATCH] doc/pupdevices: drop gears example This is reserved for the detailed Motor page. --- doc/api/pupdevices.rst | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/doc/api/pupdevices.rst b/doc/api/pupdevices.rst index 412db43..9706199 100644 --- a/doc/api/pupdevices.rst +++ b/doc/api/pupdevices.rst @@ -13,24 +13,12 @@ Motor Example:: - # Initialize a motor (by default this means is, without any gears). + # Initialize a motor. example_motor = Motor(Port.A) # Initialize a motor with positive speed as counterclockwise right_motor = Motor(Port.B, Direction.COUNTERCLOCKWISE) - # Initialize a motor with a gear train - robot_arm = Motor(Port.C, Direction.CLOCKWISE, [12, 36]) - - .. rubric:: Methods for motors without rotation sensors - - .. automethod:: pybricks.pupdevices.Motor.dc - - Example:: - - # Set the motor duty cycle to 75%. - example_motor.duty(75) - .. rubric:: Methods for motors with rotation sensors .. automethod:: pybricks.pupdevices.Motor.angle @@ -49,6 +37,17 @@ Motor .. automethod:: pybricks.pupdevices.Motor.run_target + .. rubric:: Methods for all motors + + .. automethod:: pybricks.pupdevices.Motor.dc + + Example:: + + # Set the motor duty cycle to 75%. + example_motor.duty(75) + + .. automethod:: pybricks.pupdevices.Motor.stop + Color and Distance Sensor ^^^^^^^^^^^^^^^^^^^^^^^^^