doc/pupdevices/Light: and blink and fade examples

This commit is contained in:
Laurens Valk
2020-07-11 13:00:28 +02:00
parent 19009d1637
commit d15aa22131
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -274,6 +274,19 @@ Light
.. figure:: ../api/images/light.png
:width: 90 %
.. toggle-header::
:header: **Show/hide examples**
**Example 1: Making the light blink**
.. literalinclude::
../../pybricks-projects/snippets/pup/light/basics.py
**Example 2: Using math to gradually change the brightness of the light**
.. literalinclude::
../../pybricks-projects/snippets/pup/light/math.py
.. autoclass:: pybricks.pupdevices.Light
:no-members: