Skip to content

Commit

Permalink
docs: Add V2 microbit.set_volume() info. (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed Feb 26, 2024
1 parent dd64da2 commit 5bac0f2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/microbit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5bac0f2

Please sign in to comment.