doc/pupdevices: drop gears example

This is reserved for the detailed Motor page.
This commit is contained in:
Laurens Valk
2019-11-11 13:30:08 +01:00
parent 4f25a0c467
commit ada319f88d
+12 -13
View File
@@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^