Files
pybricks-api/doc/api/pupdevices/light.rst
T
Laurens Valk b76b6cf835 doc/pupdevices: one page per sensor
This page was getting very long, so split it up for easier navigation (#33).
2020-12-29 11:47:27 +01:00

26 lines
566 B
ReStructuredText

Light
^^^^^^^^^^^^^^^^^^^^^^^^^
.. figure:: ../../api/images/light.png
:width: 90 %
.. toggle-header::
:header: **Show/hide examples**
**Example 1: Making the light blink**
.. literalinclude::
../../../examples/pup/light/basics.py
**Example 2: Using math to gradually change the brightness of the light**
.. literalinclude::
../../../examples/pup/light/math.py
.. autoclass:: pybricks.pupdevices.Light
:no-members:
.. automethod:: pybricks.pupdevices.Light.on
.. automethod:: pybricks.pupdevices.Light.off