mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-27 19:57:02 +00:00
pybricks.iodevices: Document DCMotor.
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
DC Motor
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note::
|
||||
This class is specifically for EV3 and NXT. This lets you drive motors that
|
||||
are not automatically detected as motors. This includes RCX motors and Power
|
||||
Function motors that are connected via the official converter cables. Note:
|
||||
Applying motor power to custom electronics may damage the hub or the device.
|
||||
|
||||
This class is specifically for on EV3. For Powered Up DC Motors, just use
|
||||
the :class:`DCMotor <pybricks.pupdevices.DCMotor>` class.
|
||||
For Powered Up DC Motors, just use
|
||||
the :class:`DCMotor <pybricks.pupdevices.DCMotor>` class instead, which will
|
||||
automatically detect the motor and use the correct and safe settings.
|
||||
|
||||
.. figure:: ../../main/cad/output/iodevice-dcmotor.png
|
||||
:width: 40 %
|
||||
@@ -16,5 +20,8 @@ DC Motor
|
||||
.. automethod:: pybricks.iodevices.DCMotor.dc
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.brake
|
||||
:noindex:
|
||||
|
||||
.. automethod:: pybricks.iodevices.DCMotor.stop
|
||||
:noindex:
|
||||
|
||||
Reference in New Issue
Block a user