mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 09:37:25 +00:00
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.
28 lines
514 B
ReStructuredText
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
|