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.
This commit is contained in:
Laurens Valk
2020-12-29 14:43:08 +01:00
parent ab1f58c2cc
commit 070264647f
+15 -13
View File
@@ -4,22 +4,24 @@ 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
Examples
-------------------
Making the light blink
**********************
.. literalinclude::
../../../examples/pup/light/basics.py
Gradually change the brightness
*******************************
.. literalinclude::
../../../examples/pup/light/math.py