pybricks.iodevices: Document DCMotor.

This commit is contained in:
Laurens Valk
2026-05-29 15:39:24 +02:00
parent a0e98ba75f
commit 7d27fbb5d8
+10 -3
View File
@@ -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: