Files
pybricks-api/doc/api/pupdevices/light.rst
T
Laurens Valk 070264647f doc/pupdevices/Light: split examples
Now that each device is on its own page, we no longer need to collapse snippets to reduce page size. Now they can just all be at the bottom of the page. This also gives each a dedicated link which is easier when giving support.
2020-12-29 14:43:08 +01:00

28 lines
514 B
ReStructuredText

Light
^^^^^^^^^^^^^^^^^^^^^^^^^
.. figure:: ../../api/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