From 2e530a4b3067ea6151075d04141b4952a39d5c50 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 9 Dec 2019 17:14:48 +0100 Subject: [PATCH] doc/hubs: toggle example snippet This shows how to add and include an example project as a snippet. --- doc/api/hubs_ev3brick.inc | 7 +++++++ pybricks-projects | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/api/hubs_ev3brick.inc b/doc/api/hubs_ev3brick.inc index ccd2d9a..582bf8b 100644 --- a/doc/api/hubs_ev3brick.inc +++ b/doc/api/hubs_ev3brick.inc @@ -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 diff --git a/pybricks-projects b/pybricks-projects index b49356a..028efa9 160000 --- a/pybricks-projects +++ b/pybricks-projects @@ -1 +1 @@ -Subproject commit b49356a69756cda33af7ca1e76aab6615eaedbee +Subproject commit 028efa9c6c058730813e629292236e487941558b