mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-15 02:54:52 +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.
28 lines
515 B
ReStructuredText
28 lines
515 B
ReStructuredText
Light
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. figure:: ../../main/images/light.png
|
|
:width: 90 %
|
|
|
|
.. autoclass:: pybricks.pupdevices.Light
|
|
:no-members:
|
|
|
|
.. automethod:: pybricks.pupdevices.Light.on
|
|
|
|
.. automethod:: pybricks.pupdevices.Light.off
|
|
|
|
Examples
|
|
-------------------
|
|
|
|
Making the light blink
|
|
**********************
|
|
|
|
.. literalinclude::
|
|
../../../examples/pup/light/basics.py
|
|
|
|
Gradually change the brightness
|
|
*******************************
|
|
|
|
.. literalinclude::
|
|
../../../examples/pup/light/math.py
|