mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
doc/hubs: toggle example snippet
This shows how to add and include an example project as a snippet.
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
|
||||
.. automethod:: pybricks._instances.light.on
|
||||
|
||||
.. toggle-header::
|
||||
:header: **Show/hide example**
|
||||
|
||||
**Example: Turn the light on and change the color.**
|
||||
|
||||
.. literalinclude:: ../../pybricks-projects/snippets/ev3/light_color/main.py
|
||||
|
||||
.. automethod:: pybricks._instances.light.off
|
||||
|
||||
.. rubric:: Using the speaker
|
||||
|
||||
+1
-1
Submodule pybricks-projects updated: b49356a697...028efa9c6c
Reference in New Issue
Block a user