Skip to content

Commit f26374b

Browse files
docs: Add V2 microbit.set_volume() info. (bbcmicrobit#742)
1 parent 84012a9 commit f26374b

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
@@ -58,6 +58,16 @@ Functions
5858

5959
:returns: The ``value`` converted to the ``to`` range.
6060

61+
.. py:function:: set_volume(volume)
62+
63+
(**V2 only**) Configure the output volume of the micro:bit speaker and
64+
pins::
65+
66+
microbit.set_volume(127)
67+
68+
:param volume: An integer between 0 and 255 to set the volume.
69+
70+
6171
.. py:function:: sleep(n)
6272
6373
Wait for ``n`` milliseconds. One second is 1000 milliseconds, so

0 commit comments

Comments
 (0)