Skip to content

Commit 45c3f4d

Browse files
docs: Add V2 microbit.set_volume() info. (#742)
1 parent 790f387 commit 45c3f4d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/microbit.rst

+10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ Functions
3232
restarted.
3333

3434

35+
.. py:function:: set_volume(volume)
36+
37+
(**V2 only**) Configure the output volume of the micro:bit speaker and
38+
pins::
39+
40+
microbit.set_volume(127)
41+
42+
:param volume: An integer between 0 and 255 to set the volume.
43+
44+
3545
.. py:function:: sleep(n)
3646
3747
Wait for ``n`` milliseconds. One second is 1000 milliseconds, so

0 commit comments

Comments
 (0)