mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
doc/pupdevices/Light: and blink and fade examples
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
+1
-1
Submodule pybricks-projects updated: 3b9663d93b...dc82cd5d07
Reference in New Issue
Block a user