Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/microbit_micropython_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ The Microphone is accessed via the `microphone` object::
set_threshold(128)
# Returns a representation of the sound pressure level in the range 0 to 255.
sound_level()
# Returns a representation of the sound pressure level in decibels (dB).
sound_level_db()

Pins
----
Expand Down
4 changes: 4 additions & 0 deletions docs/microphone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ Functions

:return: A representation of the sound pressure level in the range 0 to 255.

.. py:function:: sound_level_db()

:return: A representation of the sound pressure level in decibels (dB)
in the range of 52.0 to 110.0 dB.

Example
=======
Expand Down