mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 09:37:25 +00:00
The doc/api is a legacy name, which is confusing in the current use, since all build targets are now APIs. Today we have: doc/common: Common configuration and settings between all targets. doc/main: Main Pybricks documentation at docs.pybricks.com. doc/ide: Documentation shipped with the Pybricks Code IDE.
25 lines
1.0 KiB
ReStructuredText
25 lines
1.0 KiB
ReStructuredText
Direction
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. class:: Direction
|
|
|
|
Rotational direction for positive speed or angle values.
|
|
|
|
.. autoattribute:: pybricks.parameters.Direction.CLOCKWISE
|
|
:annotation:
|
|
|
|
.. autoattribute:: pybricks.parameters.Direction.COUNTERCLOCKWISE
|
|
:annotation:
|
|
|
|
+--------------------------------+-------------------+-----------------+
|
|
| ``positive_direction =`` | Positive speed: | Negative speed: |
|
|
+================================+===================+=================+
|
|
| ``Direction.CLOCKWISE`` | clockwise | counterclockwise|
|
|
+--------------------------------+-------------------+-----------------+
|
|
| ``Direction.COUNTERCLOCKWISE`` | counterclockwise | clockwise |
|
|
+--------------------------------+-------------------+-----------------+
|
|
|
|
In general, clockwise is defined by **looking at the motor shaft, just
|
|
like looking at a clock**. Some motors have two shafts. If in doubt,
|
|
refer to the diagram in the ``Motor`` class documentation.
|