Skip to content

Commit ab71b4f

Browse files
docs: Add V2 microbit.set_volume() info. (bbcmicrobit#742)
1 parent 2ee1338 commit ab71b4f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/microbit.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ Functions
5151

5252
:returns: The ``value`` converted to the ``to`` range.
5353

54+
.. py:function:: set_volume(volume)
55+
56+
(**V2 only**) Configure the output volume of the micro:bit speaker and
57+
pins::
58+
59+
microbit.set_volume(127)
60+
61+
:param volume: An integer between 0 and 255 to set the volume.
62+
63+
5464
.. py:function:: sleep(n)
5565
5666
Wait for ``n`` milliseconds. One second is 1000 milliseconds, so

0 commit comments

Comments
 (0)