From 5bac0f2e381625686bd8053de9beb988f0b7b74d Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Mon, 25 Apr 2022 15:16:41 +0200 Subject: [PATCH] docs: Add V2 microbit.set_volume() info. (#742) --- docs/microbit.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/microbit.rst b/docs/microbit.rst index 6f6fcea9a..9c13a85c1 100644 --- a/docs/microbit.rst +++ b/docs/microbit.rst @@ -58,6 +58,16 @@ Functions :returns: The ``value`` converted to the ``to`` range. +.. py:function:: set_volume(volume) + + (**V2 only**) Configure the output volume of the micro:bit speaker and + pins:: + + microbit.set_volume(127) + + :param volume: An integer between 0 and 255 to set the volume. + + .. py:function:: sleep(n) Wait for ``n`` milliseconds. One second is 1000 milliseconds, so